Bug 18316 Status line update when selecting task in task list
The following code snippet is executes by the CompilationUnitEditor when pressing the Next/Previous Problem buttons in the toolbar and also when using the keyboard shortcuts Ctrl+E/P. In the first case, the task list selection is updated and the status line is changed. In the second case, the status line is cleared. (The method setStatusLineErrorMessage calls setErrorMessage of the status line manager.) if (marker != null) { IWorkbenchPage page= getSite().getPage(); IViewPart view= view= page.findView("org.eclipse.ui.views.TaskList"); // $NON-NLS-1$ if (view instanceof TaskList) { StructuredSelection ss= new StructuredSelection(marker); ((TaskList) view).setSelection(ss, true); } } selectAndReveal(errorPosition.getOffset(), errorPosition.getLength()); setStatusLineErrorMessage(nextError.getMessage());
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/JavaEditor.java
/**
	 * Returns the java element of this editor's input corresponding to the given IJavaElement
	 */
	abstract protected IJavaElement getCorrespondingElement(IJavaElement element);
	
	/**
	 * Sets the input of the editor's outline page.
	 */
	abstract protected void setOutlinePageInput(JavaOutlinePage page, IEditorInput input);
	
	
	/**
	 * Default constructor.
	 */
	public JavaEditor() {
		super();
		JavaTextTools textTools= JavaPlugin.getDefault().getJavaTextTools();
		setSourceViewerConfiguration(new JavaSourceViewerConfiguration(textTools, this, IJavaPartitions.JAVA_PARTITIONING));
		setRangeIndicator(new DefaultRangeIndicator());
		setPreferenceStore(JavaPlugin.getDefault().getPreferenceStore());
		setKeyBindingScopes(new String[] { "org.eclipse.jdt.ui.javaEditorScope" });  
	}
	
	/*
	 * @see AbstractTextEditor#createSourceViewer(Composite, IVerticalRuler, int)
	 */
	protected final ISourceViewer createSourceViewer(Composite parent, IVerticalRuler verticalRuler, int styles) {
		
		ISourceViewer viewer= createJavaSourceViewer(parent, verticalRuler, getOverviewRuler(), isOverviewRulerVisible(), styles);