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
IDEWorkbenchPlugin.getDefault().getPreferenceStore().setToDefault(
				IDE_ENCODINGS_PREFERENCE);
	}
	/**
	 * Get the displayable string for the byte order marking from the supplied
	 * file description.
	 * 
	 * @param description
	 *            The description to query. May be <code>null</code>.
	 * @return String or <code>null</code> if the byte order mark cannot be
	 *         found or the description is <code>null</code>.
	 * @see IContentDescription#getProperty(org.eclipse.core.runtime.QualifiedName)
	 */
	public static String getByteOrderMarkLabel(IContentDescription description) {
		if (description == null)
			return null;
		byte[] bom = (byte[]) description
				.getProperty(IContentDescription.BYTE_ORDER_MARK);
		if (bom == null)
			return (String) description
					.getProperty(IContentDescription.CHARSET);
		if (bom == IContentDescription.BOM_UTF_8)
			return IDEEncoding.BOM_UTF_8;
		if (bom == IContentDescription.BOM_UTF_16BE)
			return IDEEncoding.BOM_UTF_16BE;
		if (bom == IContentDescription.BOM_UTF_16LE)
			return IDEEncoding.BOM_UTF_16LE;
		return null;
	}
}