Bug 76453 [Encodings] Open properties fills log with encoding messages
I20041013 Every time I open the properties for a file it writes the following entries to .log (and also messages to the console): !ENTRY org.eclipse.ui 4 4 Okt 18, 2004 10:21:41.328 !MESSAGE null is not a valid charset. !ENTRY org.eclipse.ui 4 4 Okt 18, 2004 10:21:41.328 !MESSAGE null is not a valid charset. !ENTRY org.eclipse.ui 4 4 Okt 18, 2004 10:21:41.338 !MESSAGE null is not a valid charset. !ENTRY org.eclipse.ui 4 4 Okt 18, 2004 10:21:41.338 !MESSAGE null is not a valid charset. !ENTRY org.eclipse.ui 4 4 Okt 18, 2004 10:21:41.338 !MESSAGE null is not a valid charset. !ENTRY org.eclipse.ui 4 4 Okt 18, 2004 10:21:41.348 !MESSAGE null is not a valid charset. !ENTRY org.eclipse.ui 4 4 Okt 18, 2004 10:21:41.348 !MESSAGE null is not a valid charset. !ENTRY org.eclipse.ui 4 4 Okt 18, 2004 10:21:41.358 !MESSAGE null is not a valid charset. !ENTRY org.eclipse.ui 4 4 Okt 18, 2004 10:21:41.358 !MESSAGE null is not a valid charset. !ENTRY org.eclipse.ui 4 4 Okt 18, 2004 10:21:41.358 !MESSAGE null is not a valid charset. !ENTRY org.eclipse.ui 4 4 Okt 18, 2004 10:21:41.368 !MESSAGE null is not a valid charset. !ENTRY org.eclipse.ui 4 4 Okt 18, 2004 10:21:41.368 !MESSAGE null is not a valid charset. !ENTRY org.eclipse.ui 4 4 Okt 18, 2004 10:21:41.378 !MESSAGE null is not a valid charset. !ENTRY org.eclipse.ui 4 4 Okt 18, 2004 10:21:41.378 !MESSAGE null is not a valid charset. !ENTRY org.eclipse.ui 4 4 Okt 18, 2004 10:21:41.388 !MESSAGE null is not a valid charset. !ENTRY org.eclipse.ui 4 4 Okt 18, 2004 10:21:41.388 !MESSAGE null is not a valid charset. !ENTRY org.eclipse.ui 4 4 Okt 18, 2004 10:21:41.388 !MESSAGE null is not a valid charset.
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/IDEEncoding.java
}
		};
		charsetJob.schedule();
		
	}
	/**
	 * Add value to the list of workbench encodings.
	 * 
	 * @param value
	 */
	public static void addIDEEncoding(String value) {
		
		if(WorkbenchEncoding.getDefinedEncodings().contains(value))
			return;
		
		Iterator currentEncodings = getIDEEncodingsPreference().iterator();
		boolean addValue = true;
		StringBuffer result = new StringBuffer();
		
		while(currentEncodings.hasNext()){
			String string = (String) currentEncodings.next();
			result.append(string);
			result.append(PREFERENCE_SEPARATOR);
			if (string.equals(value))
				addValue = false;
		}
		if (addValue)
			result.append(value);
		IDEWorkbenchPlugin.getDefault().getPreferenceStore().setValue(
				IDE_ENCODINGS_PREFERENCE, result.toString());