Bug 46395 [RCP] Open With not persistent
N20031111 Start fresh workspace and create a type in a new Java project. Close the Java editor Select the file, Open With > Text editor Close the text editor Double-click the file ==> opens in Java editor. Before RCP it used to remember which editor was used.
bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/OpenWithMenu.java
return true;
}
/**
 * Opens the given editor on the selected file.
 *
 * @param editor the editor descriptor, or null for the system editor
 */
private void openEditor(IEditorDescriptor editor) {
	IFile file = getFileResource();
	try {
		if (editor == null) {
			page.openEditor(new FileEditorInput(file), IEditorRegistry.SYSTEM_EXTERNAL_EDITOR_ID);
		} else {
			page.openEditor(new FileEditorInput(file), editor.getId());
		}
	} catch (PartInitException e) {
		DialogUtil.openError(
			page.getWorkbenchWindow().getShell(),
			IDEWorkbenchMessages.getString("OpenWithMenu.dialogTitle"), 
			e.getMessage(),
			e);
	}
}
/**
 * Creates the menu item for clearing the current selection.
 *
 * @param menu the menu to add the item to
 * @param file the file bing edited
 * @param registry the editor registry
 */