Bug 17480 Menus for Ole documents incorrect
Eclipse F1 1) Open an ole editor on a bitmap file 2) Open an ole eidtor on a word document 3) flip between the two tabs by clicking on the tabs. Notice that the menu is not the correct menu for the ole editor that is active. The problem is that one editor is being activated and setting the menu and then the other editor is being deactivated which wipes out the menu. The fix is: OleEditor.setFocus should do nothing: public void setFocus() { } and OleEditor.activateClientPart should activate the editor: private void activateClient(IWorkbenchPart part) { if (part == this) { oleActivate(); } } Note that the method clientFrame.setFocus does not need to be called - activation will take care of the focus.
bundles/org.eclipse.ui.win32/src/org/eclipse/ui/internal/editorsupport/win32/OleEditor.java
*/
	private boolean clientActive = false;
	/**
	 * Keep track of whether we have activated OLE or not as some applications
	 * will only allow single activations.
	 */
	private boolean oleActivated = false;
	private IPartListener partListener = new IPartListener() {
		public void partActivated(IWorkbenchPart part) {
			activateClient(part);
		}
		public void partBroughtToTop(IWorkbenchPart part) {
		}
		public void partClosed(IWorkbenchPart part) {
		}
		public void partOpened(IWorkbenchPart part) {
		}
		public void partDeactivated(IWorkbenchPart part) {
			deactivateClient(part);
		}
	};
	private static final String FILE_PROMPTER_TITLE =
		WorkbenchMessages.getString("OleEditor.renameTitle"); 
	
	private static final String FILE_PROMPTER_MESSAGE =
		WorkbenchMessages.getString("OleEditor.renameMessage"); 
	
	private static final String RENAME_ERROR_TITLE =
		WorkbenchMessages.getString("OleEditor.errorSaving");