Java源码示例:org.eclipse.ui.intro.IIntroSite

示例1
@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();
	}
}
 
示例2
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();
    }
}
 
示例3
@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();
	}
}
 
示例4
@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();
    }
}
 
示例5
@Override
public void run(IIntroSite site, Properties params) {
    // this.params = params;
    PlatformUI.getWorkbench().getIntroManager().closeIntro(PlatformUI.getWorkbench().getIntroManager().getIntro());
    doRun();

}
 
示例6
@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();
    }
}
 
示例7
@Override
public void run(IIntroSite introSite, Properties param) {
    Map<String, Object> parameters = asMap(param);
    if(commandExecutor.canExecute(param.getProperty("id"), parameters)) {
        commandExecutor.executeCommand(param.getProperty("id"), parameters);
    }
}
 
示例8
@Override
public void run(IIntroSite site, Properties params) {
	openWizard(TRAFFICLIGHT_EXAMPLE_WIZARD);
}
 
示例9
public void run(IIntroSite site, Properties params) {
    PlatformUI.getWorkbench().getIntroManager().closeIntro(PlatformUI.getWorkbench().getIntroManager().getIntro());
    selectRootObject(params);
    doRun();
}
 
示例10
@Override
public void run(final IIntroSite site, final Properties params) {
    final String urlToOpen = retrieveURLToOpen(params);
    openInExternalBrowser(urlToOpen);
}