org.eclipse.jface.text.ITextPresentationListener Java Examples

The following examples show how to use org.eclipse.jface.text.ITextPresentationListener. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: XtextSourceViewer.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
/**
 * copied from org.eclipse.jdt.internal.ui.javaeditor.JavaSourceViewer.prependTextPresentationListener(ITextPresentationListener)
 */
public void prependTextPresentationListener(ITextPresentationListener listener) {
	Assert.isNotNull(listener);

	if (fTextPresentationListeners == null)
		fTextPresentationListeners= new ArrayList<ITextPresentationListener>();

	fTextPresentationListeners.remove(listener);
	fTextPresentationListeners.add(0, listener);
}
 
Example #2
Source File: JavaSourceViewer.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * 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);
}
 
Example #3
Source File: ScriptConsoleViewerWrapper.java    From Pydev with Eclipse Public License 1.0 4 votes vote down vote up
public void addTextPresentationListener(ITextPresentationListener listener) {
    viewer.addTextPresentationListener(listener);
}
 
Example #4
Source File: ScriptConsoleViewerWrapper.java    From Pydev with Eclipse Public License 1.0 4 votes vote down vote up
public void removeTextPresentationListener(ITextPresentationListener listener) {
    viewer.removeTextPresentationListener(listener);
}