本文整理汇总了Java中org.eclipse.core.commands.contexts.IContextManagerListener类的典型用法代码示例。如果您正苦于以下问题:Java IContextManagerListener类的具体用法?Java IContextManagerListener怎么用?Java IContextManagerListener使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IContextManagerListener类属于org.eclipse.core.commands.contexts包,在下文中一共展示了IContextManagerListener类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addContextManagerListener
import org.eclipse.core.commands.contexts.IContextManagerListener; //导入依赖的package包/类
/**
* Adds a listener to this context service. The listener will be notified
* when the set of defined contexts changes. This can be used to track the
* global appearance and disappearance of contexts.
* <p>
* <b>Note:</b> listeners should be removed when no longer necessary. If
* not, they will be removed when the IServiceLocator used to acquire this
* service is disposed.
* </p>
*
* @param listener
* The listener to attach; must not be <code>null</code>.
* @since 3.2
* @see #removeContextManagerListener(IContextManagerListener)
*/
public void addContextManagerListener(IContextManagerListener listener);
示例2: removeContextManagerListener
import org.eclipse.core.commands.contexts.IContextManagerListener; //导入依赖的package包/类
/**
* Removes a listener from this context service.
*
* @param listener
* The listener to be removed; must not be <code>null</code>.
* @since 3.2
*/
public void removeContextManagerListener(IContextManagerListener listener);