/** Prepend given listener to the list of presentation listeners */ public void prependTextPresentationListener(ITextPresentationListener listener) { Assert.isNotNull(listener); if (fTextPresentationListeners == null) { fTextPresentationListeners = new ArrayList<ITextPresentationListener>(); } fTextPresentationListeners.remove(listener); fTextPresentationListeners.add(0, listener); }
/** * copied from org.eclipse.jdt.internal.ui.javaeditor.JavaSourceViewer.prependTextPresentationListener(ITextPresentationListener) */ @SuppressWarnings("unchecked") public void prependTextPresentationListener(ITextPresentationListener listener) { Assert.isNotNull(listener); if (fTextPresentationListeners == null) fTextPresentationListeners= new ArrayList<ITextPresentationListener>(); fTextPresentationListeners.remove(listener); fTextPresentationListeners.add(0, listener); }
/** * Prepends the text presentation listener at the beginning of the viewer's * list of text presentation listeners. If the listener is already registered * with the viewer this call moves the listener to the beginning of * the list. * * @param listener the text presentation listener * @since 3.0 */ public void prependTextPresentationListener(ITextPresentationListener listener) { Assert.isNotNull(listener); if (fTextPresentationListeners == null) fTextPresentationListeners= new ArrayList<ITextPresentationListener>(); fTextPresentationListeners.remove(listener); fTextPresentationListeners.add(0, listener); }
public void registerTextPresentationListener(ITextPresentationListener listener) { ISourceViewer viewer = getSourceViewer(); if (viewer instanceof TextViewer) { ((TextViewer) viewer).addTextPresentationListener(listener); } }
public void addTextPresentationListener(ITextPresentationListener listener) { viewer.addTextPresentationListener(listener); }
public void removeTextPresentationListener(ITextPresentationListener listener) { viewer.removeTextPresentationListener(listener); }