类org.eclipse.ui.intro.IIntroManager源码实例Demo

下面列出了怎么用org.eclipse.ui.intro.IIntroManager的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: n4js   文件: TestedN4JSWorkspace.java
@Override
protected void starting(Description d) {
	name = d.getMethodName();

	assertEmptyIndex();

	IProject[] projects = IResourcesSetupUtil.root().getProjects();
	if (projects.length != 0) {
		Assert.assertEquals(1, projects.length);
		Assert.assertEquals("RemoteSystemsTempFiles", projects[0].getName());
	}

	if (PlatformUI.isWorkbenchRunning()) {
		final IIntroManager introManager = PlatformUI.getWorkbench().getIntroManager();
		if (introManager.getIntro() != null) {
			Display.getDefault().asyncExec(() -> introManager.closeIntro(introManager.getIntro()));
		}
	}
}
 
源代码2 项目: 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();
	}
}
 
源代码3 项目: bonita-studio   文件: PlatformUtil.java
public static void showIntroPart(IWorkbenchPage page) {
    final IIntroManager introManager = PlatformUI.getWorkbench().getIntroManager();
    //colse intro to reload content if already opened
    hideIntroPart();
    final IntroModelRoot model = IntroPlugin.getDefault().getIntroModelRoot();
    if (model != null
            && introManager.getIntro() != null
            && ((CustomizableIntroPart) introManager.getIntro()).getControl() != null) {
        model.getPresentation().navigateHome();
    }
    BonitaPerspectivesUtils.switchToPerspective("org.bonitasoft.studio.perspective.welcomePage");
    page.setEditorAreaVisible(false);
    introManager.showIntro(
            page.getWorkbenchWindow(),
            false);

    page.setPartState(page.findViewReference("org.bonitasoft.studio.application.project.explorer"),
            IWorkbenchPage.STATE_RESTORED);
}
 
源代码4 项目: codewind-eclipse   文件: GetStartedAction.java
@Override
public void run() {
	// Close the Eclipse welcome page
	IIntroManager manager = PlatformUI.getWorkbench().getIntroManager();
	IIntroPart introPart = manager.getIntro();
	if (introPart != null) {
		manager.closeIntro(introPart);
	}
	
	// Open the J2EE perspective
	try {
		IWorkbench workbench = PlatformUI.getWorkbench();
		workbench.showPerspective("org.eclipse.jst.j2ee.J2EEPerspective", workbench.getActiveWorkbenchWindow());
	} catch (Exception e) {
		Logger.logError("An error occurred trying to open the J2EE perspective", e);
	}

	// Open the Codewind welcome page
	IEditorPart part = OpenWelcomePageAction.openWelcomePage();

	// Open the Codewind Explorer view
	ViewHelper.openCodewindExplorerViewNoExec();

	// Make the welcome page the focus
	if (part != null) {
		IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
		if (window != null) {
			IWorkbenchPage page = window.getActivePage();
			if (page != null) {
				page.activate(part);
			}
		}
	}
}
 
源代码5 项目: xtext-eclipse   文件: AbstractWorkbenchTest.java
protected static void closeWelcomePage() throws InterruptedException {
	IIntroManager introManager = getWorkbench().getIntroManager();
	IIntroPart intro = introManager.getIntro();
	if (intro != null) {
		introManager.closeIntro(intro);
	}
}
 
源代码6 项目: xtext-eclipse   文件: TestedWorkspace.java
@Override
protected void starting(Description d) {
	name = d.getMethodName();
	
	assertEmptyIndex();
	Assert.assertEquals(0, IResourcesSetupUtil.root().getProjects().length);

	if (PlatformUI.isWorkbenchRunning()) {
		final IIntroManager introManager = PlatformUI.getWorkbench().getIntroManager();
		if (introManager.getIntro() != null) {
			Display.getDefault().asyncExec(()->introManager.closeIntro(introManager.getIntro()));
		}
	}
}
 
源代码7 项目: sarl   文件: SarlExampleInstallerWizard.java
/** Close the welcome page.
 */
protected static void closeWelcomePage() {
	final IIntroManager introManager = PlatformUI.getWorkbench().getIntroManager();
	if (introManager != null) {
		final IIntroPart intro = introManager.getIntro();
		if (intro != null) {
			introManager.closeIntro(intro);
		}
	}
}
 
源代码8 项目: saros   文件: StartupSaros.java
private static void openSarosView() {

    IIntroManager m = PlatformUI.getWorkbench().getIntroManager();
    IIntroPart i = m.getIntro();
    /*
     * if there is a welcome screen, do not open the SarosView
     * because it would be maximized and hiding the workbench window.
     */
    if (i == null) ViewUtils.openSarosView();
  }
 
源代码9 项目: bonita-studio   文件: PlatformUtil.java
public static boolean isIntroOpen() {
    final IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
    if (window != null) {
        final IWorkbenchPage activePage = window.getActivePage();
        if (activePage != null) {
            for (final IViewReference vr : activePage.getViewReferences()) {
                if (vr.getId().equals(INTROVIEW_ID)) {
                    return true;
                }
            }
            final IWorkbenchPart part = activePage.getActivePart();
            if (part != null) {
                final IIntroManager introManager = PlatformUI.getWorkbench().getIntroManager();
                if (introManager != null) {
                    if (introManager.getIntro() != null) {
                        return true;
                    } else {
                        final IViewPart view = activePage.findView(INTROVIEW_ID);
                        return view != null;
                    }
                }
            }
        }

    }
    return false;
}
 
源代码10 项目: ghidra   文件: GhidraDevStartup.java
@Override
public void earlyStartup() {
	Job job = new Job(Activator.PLUGIN_ID + " startup") {
		@Override
		protected IStatus run(IProgressMonitor monitor) {
			monitor.beginTask("Initializing " + Activator.PLUGIN_ID, 2);

			// If we were launched from Ghidra, close the Eclipse welcome screen if present,
			// and make it so it never shows up again.
			if (Activator.getDefault().isLaunchedByGhidra()) {
				IIntroManager introManager = PlatformUI.getWorkbench().getIntroManager();
				IIntroPart intro = introManager.getIntro();
				if (intro != null) {
					Display.getDefault().syncExec(() -> introManager.closeIntro(intro));
				}
				PlatformUI.getPreferenceStore().setValue(
					IWorkbenchPreferenceConstants.SHOW_INTRO, false);
			}

			// Ask the user (only once) for consent before listening on any ports
			boolean firstTimeConsent = false;
			if (!GhidraRootPreferences.requestedConsentToOpenPorts()) {
				firstTimeConsent = EclipseMessageUtils.showQuestionDialog(
					Activator.PLUGIN_ID + "User Consent",
					Activator.PLUGIN_ID + " opens ports to enable communication with Ghidra " +
						"for various features such as initiating script editing and symbol " +
						"lookup from Ghidra.\n\nDo you consent to the ports being opened?\n\n" +
						"If you do not consent now, you can enable these features at any " +
						"time in the " + Activator.PLUGIN_ID + " preferences.");
				GhidraRootPreferences.setOpenPortConsentRequest(true);
			}

			// Initialize the script editor
			ScriptEditorInitializer.init(firstTimeConsent);
			monitor.worked(1);

			// Initialize symbol lookup
			SymbolLookupInitializer.init(firstTimeConsent);
			monitor.worked(1);

			monitor.done();
			return Status.OK_STATUS;
		}
	};
	job.schedule();
   }
 
 类所在包
 类方法
 同包方法