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
IFile file = getFileResource();
	if (file == null) {
		return;
	}
	IEditorDescriptor defaultEditor = registry.findEditor(IDEWorkbenchPlugin.DEFAULT_TEXT_EDITOR_ID); 
	IEditorDescriptor preferredEditor = IDE.getDefaultEditor(file); 
	
	Object[] editors = registry.getEditors(file.getName());
	Collections.sort(Arrays.asList(editors), comparer);
	boolean defaultFound = false;
	
	
	
	ArrayList alreadyMapped= new ArrayList();
	for (int i = 0; i < editors.length; i++) {
		IEditorDescriptor editor = (IEditorDescriptor) editors[i];
		if(!alreadyMapped.contains(editor)){
			createMenuItem(menu, editor, preferredEditor);
			if (defaultEditor != null && editor.getId().equals(defaultEditor.getId()))
				defaultFound = true;
			alreadyMapped.add(editor);
		}		
	}
	
	if (editors.length > 0)
		new MenuItem(menu, SWT.SEPARATOR);
	
	if (!defaultFound && defaultEditor != null) {
		createMenuItem(menu, defaultEditor, preferredEditor);
	}