Bug 21198 On JavaEditor dont use == in the isActivePart() method but instead use .equals(Object)
The class JavaEditor does an == check inside isActivePart(). This means that if the part is embedded inside another one then the check fails. Rather than this can it use .equals instead and dispatch this to the other part that can specialize accordingly, e.g. instead of the current method protected boolean isActivePart() { IWorkbenchWindow window= getSite().getWorkbenchWindow(); IPartService service= window.getPartService(); return (this == service.getActivePart()); } it could have the last line as return (service.getActivePart().equals(this));
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditor.java
setSourceViewerConfiguration(new JavaSourceViewerConfiguration(textTools, this));
		setRangeIndicator(new DefaultRangeIndicator());
		setPreferenceStore(JavaPlugin.getDefault().getPreferenceStore());
		
		if (JavaEditorPreferencePage.synchronizeOutlineOnCursorMove())
			fUpdater= new OutlinePageSelectionUpdater();
	}
	
	/*
	 * @see AbstractTextEditor#createSourceViewer(Composite, IVerticalRuler, int)
	 */
	protected final ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
		ISourceViewer viewer= createJavaSourceViewer(parent, ruler, styles);
		StyledText text= viewer.getTextWidget();
		text.addBidiSegmentListener(new  BidiSegmentListener() {
			public void lineGetSegments(BidiSegmentEvent event) {
				event.segments= getBidiLineSegments(event.lineOffset, event.lineText);
			}
		});
		JavaUIHelp.setHelp(this, text, IJavaHelpContextIds.JAVA_EDITOR);
		return viewer;
	}
	
	/*
	 * @see AbstractTextEditor#createSourceViewer(Composite, IVerticalRuler, int)
	 */
	protected ISourceViewer createJavaSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
			return super.createSourceViewer(parent, ruler, styles);
	}