本文整理汇总了Java中org.eclipse.ui.IPerspectiveListener类的典型用法代码示例。如果您正苦于以下问题:Java IPerspectiveListener类的具体用法?Java IPerspectiveListener怎么用?Java IPerspectiveListener使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IPerspectiveListener类属于org.eclipse.ui包,在下文中一共展示了IPerspectiveListener类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addPerspectiveListener
import org.eclipse.ui.IPerspectiveListener; //导入依赖的package包/类
private void addPerspectiveListener(IWorkbenchWindow window) {
IPerspectiveListener perspectiveListener = new PerspectiveListener();
window.addPerspectiveListener(perspectiveListener);
// triggers the event for the currently open perspective, if there is
// any
IWorkbenchPage activePage = window.getActivePage();
if (activePage != null) {
IPerspectiveDescriptor currentPerspective = window.getActivePage()
.getPerspective();
if (currentPerspective != null) {
perspectiveListener.perspectiveActivated(activePage,
currentPerspective);
}
}
}
示例2: addPerspectiveListener
import org.eclipse.ui.IPerspectiveListener; //导入依赖的package包/类
/**
* Attaches the perspective listener to active window
*
* @param listener
*/
public static void addPerspectiveListener(IPerspectiveListener listener) {
IWorkbench workbench = Activator.getDefault().getWorkbench();
IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
window.addPerspectiveListener(listener);
}
示例3: removePerspectiveListener
import org.eclipse.ui.IPerspectiveListener; //导入依赖的package包/类
@Override public void removePerspectiveListener(IPerspectiveListener listener) { }
示例4: addPerspectiveListener
import org.eclipse.ui.IPerspectiveListener; //导入依赖的package包/类
@Override public void addPerspectiveListener(IPerspectiveListener listener) { }