本文整理汇总了Java中org.eclipse.jface.text.ITextPresentationListener类的典型用法代码示例。如果您正苦于以下问题:Java ITextPresentationListener类的具体用法?Java ITextPresentationListener怎么用?Java ITextPresentationListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ITextPresentationListener类属于org.eclipse.jface.text包,在下文中一共展示了ITextPresentationListener类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: prependTextPresentationListener
import org.eclipse.jface.text.ITextPresentationListener; //导入依赖的package包/类
/** 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);
}
示例2: prependTextPresentationListener
import org.eclipse.jface.text.ITextPresentationListener; //导入依赖的package包/类
/**
* 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);
}
示例3: prependTextPresentationListener
import org.eclipse.jface.text.ITextPresentationListener; //导入依赖的package包/类
/**
* 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);
}
示例4: registerTextPresentationListener
import org.eclipse.jface.text.ITextPresentationListener; //导入依赖的package包/类
public void registerTextPresentationListener(ITextPresentationListener listener) {
ISourceViewer viewer = getSourceViewer();
if (viewer instanceof TextViewer) {
((TextViewer) viewer).addTextPresentationListener(listener);
}
}
示例5: addTextPresentationListener
import org.eclipse.jface.text.ITextPresentationListener; //导入依赖的package包/类
public void addTextPresentationListener(ITextPresentationListener listener) {
viewer.addTextPresentationListener(listener);
}
示例6: removeTextPresentationListener
import org.eclipse.jface.text.ITextPresentationListener; //导入依赖的package包/类
public void removeTextPresentationListener(ITextPresentationListener listener) {
viewer.removeTextPresentationListener(listener);
}