RCP 弹出新窗体
RCP 点击某个按钮弹出新窗体如何实现?
[解决办法]
public void run() { if (workbenchWindow == null) { // action has been disposed return; } try { String perspId; IWorkbenchPage page = workbenchWindow.getActivePage(); if (page != null && page.getPerspective() != null) { perspId = page.getPerspective().getId(); } else { perspId = workbenchWindow.getWorkbench() .getPerspectiveRegistry().getDefaultPerspective(); } workbenchWindow.getWorkbench().openWorkbenchWindow(perspId, pageInput); } catch (WorkbenchException e) { StatusUtil.handleStatus(e.getStatus(), WorkbenchMessages.OpenInNewWindowAction_errorTitle + ": " + e.getMessage(), //$NON-NLS-1$ StatusManager.SHOW); }
[解决办法]
参照RCP Mail Template
[解决办法]
RCP 和swing一样也是用事件驱动模型。多看API就可以了