org.eclipse.ui.application
Class WorkbenchAdvisor
java.lang.Object
org.eclipse.ui.application.WorkbenchAdvisor
public abstract class WorkbenchAdvisor extends Object
Public base class for configuring the workbench.
注意,工作台引导器( workbench advisor)对象先于工作台( workbench )被创建。尽管如此,使用PlatformUI.getWorkbench 确保已经完全初始化。
创建并运行Workbench(在IPlatformRunnab中)的示例:
public class MyApplication implements IPlatformRunnable {
public Object run(Object args) {
WorkbenchAdvisor workbenchAdvisor = new MyWorkbenchAdvisor();
Display display = PlatformUI.createDisplay();
int returnCode = PlatformUI.createAndRunWorkbench(display, workbenchAdvisor);
if (returnCode == PlatformUI.RETURN_RESTART) {
return IPlatformRunnable.EXIT_RESTART;
} else {
return IPlatformRunnable.EXIT_OK;
}
}
应用程序应该继承自WorkbenchAdvisor类,并覆写方法使工作台的配置符合特殊应用的需求。
以下的引导方法在工作台(workbench)的生命周期的关键点被调用(在动态调用PlatformUI.createAndRunWorkbench时,全部都触发.)
initialize – 在所有窗体之前最先调用,可用于注册实体。
preStartup – 在initialize之后但在第一个打开窗体之前调用,可用于在启动或恢复时临时禁用实体。
postStartup – 在preStartup之后但在第一个打开窗体之前调用,可用于重新启用上一步骤禁用的实体。
postRestore – 在工作台的窗体从先前保存的状态中恢复后调用。可用于调整恢复的工作台。
preWindowOpen – 在窗体打开之前调用,用于配置窗体的外貌除了工具条(菜单、工具条等)。
fillActionBars – 在preWindowOpen后调用,用来配置窗体的工具条。
postWindowRestore - 在窗体从先前保存的状态或从一个初始的状态中恢复后调用,用于调整窗体。
postWindowCreate – 在窗体从一个初始的状态或从一个恢复的状态中创建后调用,用于调整窗体。
openIntro – 打开窗体前调用,为了创建介绍组件。
postWindowOpen – 在窗体打开后调用,可用于调用窗体监听器或其他。
preWindowShellClose – 在窗体的Shell被用户关闭后调用,用来关闭屏幕窗体。
eventLoopException – 当事件循环(Event Loop)崩溃时用来操作异常事件,用来通知用户出现问题了。
eventLoopIdle – 当当前没有可以处理的事件时调用,用来执行其他工作或挂起直到新的时间进入了队列。
preShutdown – 在事件循环终止后窗体被关闭前调用,用来注销在初始化时注册的实体。
postShutdown –在事件循环终止且所有的窗体都被关闭后最后调用,用来注销在初始化时注册的实体。
Since: 3.0
<!----><!----><!---->
<!---->
构造方法摘要
protected |
WorkbenchAdvisor() Creates and initializes a new workbench advisor instance. |
<!---->
方法摘要
void |
createWindowContents(IWorkbenchWindowConfigurer configurer, Shell shell) Deprecated. since 3.1, override WorkbenchWindowAdvisor.createWindowContents(Shell) instead |
WorkbenchWindowAdvisor |
createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) Creates a new workbench window advisor for configuring a new workbench window via the given workbench window configurer. |
void |
eventLoopException(Throwable exception) Performs arbitrary actions when the event loop crashes (the code that handles a UI event throws an exception that is not caught). |
void |
eventLoopIdle(Display display) Performs arbitrary work or yields when there are no events to be processed. |
void |
fillActionBars(IWorkbenchWindow window, IActionBarConfigurer configurer, int flags) Deprecated. since 3.1, override ActionBarAdvisor.fillActionBars(int) instead |
IAdaptable |
getDefaultPageInput() Returns the default input for newly created workbench pages when the input is not explicitly specified. |
abstract String |
getInitialWindowPerspectiveId() Returns the id of the perspective to use for the initial workbench window, or null if no initial perspective should be shown in the initial workbench window. |
String |
getMainPreferencePageId() Returns the id of the preference page that should be presented most prominently. |
protected IWorkbenchConfigurer |
getWorkbenchConfigurer() Returns the workbench configurer for the advisor. |
void |
initialize(IWorkbenchConfigurer configurer) Performs arbitrary initialization before the workbench starts running. |
void |
internalBasicInitialize(IWorkbenchConfigurer configurer) Remembers the configurer and calls initialize . |
boolean |
isApplicationMenu(IWorkbenchWindowConfigurer configurer, String menuId) Deprecated. since 3.1, override ActionBarAdvisor.isApplicationMenu(String) instead |
void |
openIntro(IWorkbenchWindowConfigurer configurer) Deprecated. since 3.1, override WorkbenchWindowAdvisor.openIntro() instead |
boolean |
openWindows() Opens the workbench windows on startup. |
void |
postShutdown() Performs arbitrary finalization after the workbench stops running. |
void |
postStartup() Performs arbitrary actions after the workbench windows have been opened (or restored), but before the main event loop is run. |
void |
postWindowClose(IWorkbenchWindowConfigurer configurer) Deprecated. since 3.1, override WorkbenchWindowAdvisor.postWindowClose() instead |
void |
postWindowCreate(IWorkbenchWindowConfigurer configurer) Deprecated. since 3.1, override WorkbenchWindowAdvisor.postWindowCreate() instead |
void |
postWindowOpen(IWorkbenchWindowConfigurer configurer) Deprecated. since 3.1, override WorkbenchWindowAdvisor.postWindowOpen() instead |
void |
postWindowRestore(IWorkbenchWindowConfigurer configurer) Deprecated. since 3.1, override WorkbenchWindowAdvisor.postWindowRestore() instead |
boolean |
preShutdown() Performs arbitrary finalization before the workbench is about to shut down. |
void |
preStartup() Performs arbitrary actions just before the first workbench window is opened (or restored). |
void |
preWindowOpen(IWorkbenchWindowConfigurer configurer) Deprecated. since 3.1, override WorkbenchWindowAdvisor.preWindowOpen() instead |
boolean |
preWindowShellClose(IWorkbenchWindowConfigurer configurer) Deprecated. since 3.1, override WorkbenchWindowAdvisor.preWindowShellClose() instead |
IStatus |
restoreState(IMemento memento) Restores arbitrary application-specific state information for this workbench advisor. |
IStatus |
saveState(IMemento memento) Saves arbitrary application-specific state information for this workbench advisor. |
<!---->
分享到:
相关推荐
class汉化工具class汉化工具class汉化工具class汉化工具
ClassFinal-java class文件安全加密工具
ClassFinal是一款java class文件安全加密工具,支持直接加密jar包或war包,无需修改任何项目代码,兼容spring-framework;可避免源码泄漏或字节码被反编译
python实现的简单的class解析以及简单执行class,使用python2解析java class文件,并简单执行 class,让大家更加了解class
<div class=chose-ck v-for=(item,index2) key=index2 ref=chosebox> <p>{{item.name}} <dt v-for=(item2,index) in item.childsCurGoods :key=item2.id :class=index==iac[index2]?'check':'' :id=item2.id :...
打印机驱动 佳能Canon imageCLASS MF211 驱动打印机驱动 佳能Canon imageCLASS MF211 驱动打印机驱动 佳能Canon imageCLASS MF211 驱动打印机驱动 佳能Canon imageCLASS MF211 驱动打印机驱动 佳能Canon imageCLASS ...
众所周知,java编译后的class文件是一种中间字节码文件, 很容易被反编译工具反编译,而传统的java源代码保护方法基本都是采用混淆的方式, 但这样会带来很多麻烦,而且也不能真正保护class文件, 很多工具是对class...
class识别jdk版本 jdk版本 class识别jdk版本 jdk版本
1.Nested Class(嵌套类) 1.1.Nested class 1.2.Nested class的分类 1.3.Nested class的使用原因 2.Static Nested Classes 2.1.static nested class访问enclosing class(outer class)的成员 2.2.enclosing...
很小巧的javaclass反编译工具 只需要把点击exe文件执行 然后点击打开想要反编译的class文件 在对应的目录下就会生成.java的javabean文件 非常好用
轻松方便的把class文件转化为java文件
class文件打开工具不需要安装,直接将class文件拖拽到窗口即可
CLASS文件直接修改工具,相当好用,大家可以试试哟!
excel_class php的excel类 excel_class php的excel类 excel_class php的excel类
class文件编译器.zip
ldap提示object class violation
class-dump, class-dump-z.exe,class-dump-z win版本
java class反编译后的代码还原 java class反编译后的代码还原
用于反编译class文件,直接打开里面的exe文件运行打开class文件即可实现反编译。
bcompare对比工具插件可以对比class