Java 类org.eclipse.ui.intro.IIntroSite 实例源码

项目:solidity-ide    文件:KickStartNewProjectAction.java   
@Override
public void run(IIntroSite site, Properties params) {
    WorkspaceModifyOperation op = new WorkspaceModifyOperation() {
        @Override
        protected void execute(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
            IProject project = createProject(monitor);
            createExample(project);
        }
    };
    try {
        PlatformUI.getWorkbench().getProgressService().run(true, true, op);
        final IIntroManager introManager = PlatformUI.getWorkbench().getIntroManager();
        IIntroPart part = introManager.getIntro();
        introManager.closeIntro(part);
        IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
        IDE.openEditor(page, ResourcesPlugin.getWorkspace().getRoot().getFile(new Path("hello-world/greeter.sol")));
    } catch (Exception e) {
        e.printStackTrace();
    }
}
项目:PDFReporter-Studio    文件:OpenFileAction.java   
public void run(final IIntroSite site, Properties params) {
    String prj = (String) params.get("prj");
    String file = (String) params.get("file");

    IWorkspace ws = ResourcesPlugin.getWorkspace();
    IProject project = ws.getRoot().getProject(prj);

    final IFile f = project.getFile(file);
    Display.getDefault().asyncExec(new Runnable() {

        public void run() {
            try {
                IEditorPart ep = IDE.openEditor(site.getPage(), f, true);
                ep.setFocus();

            } catch (PartInitException e) {
                UIUtils.showError(e);
            }
        }
    });

}
项目:tesb-studio-se    文件:OpenWSDLEditorAction.java   
public void run(IIntroSite site, Properties params) {
    PlatformUI.getWorkbench().getIntroManager().closeIntro(PlatformUI.getWorkbench().getIntroManager().getIntro());

    IPerspectiveDescriptor currentPerspective = site.getPage().getPerspective();
    if (!PERSPECTIVE_ID.equals(currentPerspective.getId())) {
        // show required perspective
        IWorkbenchWindow workbenchWindow = site.getWorkbenchWindow();
        try {
            workbenchWindow.getWorkbench().showPerspective(PERSPECTIVE_ID, workbenchWindow);
        } catch (WorkbenchException e) {
            ExceptionHandler.process(e);
            return;
        }
    }

    // find repository node
    repositoryNode = (RepositoryNode) RepositorySeekerManager.getInstance().searchRepoViewNode(params.getProperty("nodeId"),
            false);
    if (null != repositoryNode) {
        // expand/select node item
        RepositoryManagerHelper.getRepositoryView().getViewer().setSelection(new StructuredSelection(repositoryNode));
        init(repositoryNode);
        doRun();
    }
}
项目:developer-studio    文件:OpenDashboardAction.java   
@Override
public void run(IIntroSite arg0, Properties arg1) {
    IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
    IWorkbenchPage page = window.getActivePage();
    try {
        IPreferenceStore preferenceStore = WorkbenchToolkit.getPreferenceStore();
        if (preferenceStore.getString(AppearancePreperance.DASHBOARD_PREFERNCES)
                .equals(AppearancePreperance.SWT_VIEW)) {
            OpenDashboardAction.DASHBOARD_VIEW_ID="org.wso2.developerstudio.eclipse.dashboard";
        }
        hideIntroView();
        hideDashboards();
        PlatformUI.getWorkbench().showPerspective(J2EE_PERSPECTIVE_ID, window);

        page.openEditor(new NullEditorInput(), DASHBOARD_VIEW_ID);
    } catch (Exception e) {
        log.error("Cannot open dashboard", e);
    }
}
项目:solidity-ide    文件:OpenURLWithExternalBrowserAction.java   
@Override
public void run(IIntroSite site, Properties params) {

    try {
        PlatformUI.getWorkbench().getBrowserSupport().getExternalBrowser()
                .openURL(new URL(params.getProperty("url")));
    } catch (PartInitException | MalformedURLException e) {
        e.printStackTrace();
    }
}
项目:hssd    文件:LaunchUpdateIntroAction.java   
public void run(IIntroSite site, Properties params) {
    Runnable r = new Runnable() {
        public void run() {
            if (!executeUpdateCommand(COMMAND_P2))
                executeUpdateCommand(COMMAND_UPDATE_MANAGER);
        }
    };
    Shell currentShell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
    currentShell.getDisplay().asyncExec(r);
}
项目:tesb-studio-se    文件:CreateCamelProcess.java   
@Override
public void run(IIntroSite site, Properties params) {
    IProxyRepositoryFactory factory = ProxyRepositoryFactory.getInstance();
    if (factory.isUserReadOnlyOnCurrentProject()) {
        MessageDialog.openWarning(null, "User Authority", "Can't create Route! Current user is read-only on this project!");
    } else {
        PlatformUI.getWorkbench().getIntroManager().closeIntro(PlatformUI.getWorkbench().getIntroManager().getIntro());
        selectRootObject(params);
        doRun();
    }
}
项目:tesb-studio-se    文件:EditCamelBean.java   
@Override
public void run(IIntroSite site, Properties params) {
    // this.params = params;
    PlatformUI.getWorkbench().getIntroManager().closeIntro(PlatformUI.getWorkbench().getIntroManager().getIntro());
    doRun();

}
项目:tesb-studio-se    文件:CreateESBAction.java   
@Override
public void run(IIntroSite site, Properties params) {
    IProxyRepositoryFactory factory = ProxyRepositoryFactory.getInstance();
    if (factory.isUserReadOnlyOnCurrentProject()) {
        MessageDialog.openWarning(null, "User Authority", "Can't create Service! Current user is read-only on this project!");
    } else {
        PlatformUI.getWorkbench().getIntroManager().closeIntro(PlatformUI.getWorkbench().getIntroManager().getIntro());
        selectRootObject(params);
        doRun();
    }
}
项目:statecharts    文件:OpenExampleIntroAction.java   
@Override
public void run(IIntroSite site, Properties params) {
    openWizard(TRAFFICLIGHT_EXAMPLE_WIZARD);
}
项目:PDFReporter-Studio    文件:OpenCheatSheetAction.java   
public void run(IIntroSite site, Properties params) {
    String file = (String) params.get("csid");
    new org.eclipse.ui.cheatsheets.OpenCheatSheetAction(file).run();

}
项目:tesb-studio-se    文件:CreateCamelBean.java   
public void run(IIntroSite site, Properties params) {
    PlatformUI.getWorkbench().getIntroManager().closeIntro(PlatformUI.getWorkbench().getIntroManager().getIntro());
    selectRootObject(params);
    doRun();
}