Bug 73556 [Encoding] Changing editor encoding causes Eclipse to freeze for a while
Here's my setup: - latest 3.0.1 build (M20040908) - large number of projects in my workspace (i.e. all of Eclipse loaded from the repository) - latest IBM VM and JXE support I changed the encoding on the Editors preference page and clicked OK. There's was a fairly long (probably in the order of a minute) delay where there was something going on but there was no progress indication. At first, Eclipse was totally frozen (i.e. I could not even move the mouse). The preferences dialog remained open with OK diabled but Cancel enabled. Once the mouse was movable again, there was a busy cursor when the mouse was over the workbench but not when the mouse was over the preferences dialog. Eventually the dialog closed and a build was launched. I don't know what changing the encoding involves but clearly there is some pretty intensive work that is happening inside a busy cursor. Either this should be done in a progress dialog or a background job.
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/IDEEncoding.java
*            String or <code>null</code> if the preference is to be reset
	 *            to the default.
	 */
	public static void setResourceEncoding(String value) {
		
		Preferences resourcePrefs = ResourcesPlugin.getPlugin()
				.getPluginPreferences();
		if (value != null)
			addIDEEncoding(value);	
		try {
			ResourcesPlugin.getWorkspace().getRoot().setDefaultCharset(value, null);
		} catch (CoreException exception) {
			ErrorDialog.openError(
					null,
					IDEWorkbenchMessages.getString("IDEEditorsPreferencePageEncodingError"),  
					exception.getMessage(),
					exception.getStatus());
		}
	}
	/**
	 * Add value to the list of workbench encodings.
	 * 
	 * @param value
	 */
	public static void addIDEEncoding(String value) {
		
		if(WorkbenchEncoding.getDefinedEncodings().contains(value))
			return;
		
		String[] currentEncodings = getIDEEncodingsPreference();