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
public static List getIDEEncodings() {
		List encodings =  getIDEEncodingsPreference();	
		encodings.addAll(WorkbenchEncoding.getDefinedEncodings());
		
		String enc = getResourceEncoding();
		if (!(enc == null || encodings.contains(enc))) 
			encodings.add(enc);
		
		Collections.sort(encodings);
		return encodings;
	}
	/**
	 * Get the current value of the encoding preference. If the value is not set
	 * return <code>null</code>.
	 * 
	 * @return String
	 */
	public static String getResourceEncoding() {
		String preference = ResourcesPlugin.getPlugin().getPluginPreferences()
				.getString(ResourcesPlugin.PREF_ENCODING);
		if (preference == null || preference.length() == 0)
			return null;
		return preference;
	}
	/**
	 * Set the resource encoding to be value. Add the encoding to the list of
	 * encodings stored by the workbench.
	 * 
	 * @param value
	 *            String or <code>null</code> if the preference is to be reset