Search in sources :

Example 1 with IntroDescriptor

use of org.eclipse.ui.internal.intro.IntroDescriptor in project gda-core by openGDA.

the class ApplicationActionBarAdvisor method makeHelpActions.

private void makeHelpActions(IWorkbenchWindow window) {
    IntroDescriptor introDescriptor = ((Workbench) window.getWorkbench()).getIntroDescriptor();
    if (introDescriptor == null)
        logger.debug("The Intro Action is not available. There doesn't appear to be a product/intro binding using the org.eclipse.ui.intro");
    else {
        introAction = ActionFactory.INTRO.create(window);
        register(introAction);
    }
    helpAction = ActionFactory.HELP_CONTENTS.create(window);
    register(helpAction);
    aboutAction = ActionFactory.ABOUT.create(window);
    register(aboutAction);
}
Also used : IntroDescriptor(org.eclipse.ui.internal.intro.IntroDescriptor) Workbench(org.eclipse.ui.internal.Workbench)

Example 2 with IntroDescriptor

use of org.eclipse.ui.internal.intro.IntroDescriptor in project eclipse.platform.ui by eclipse-platform.

the class WorkbenchIntroManager method createNewIntroPart.

/**
 * @return a new IIntroPart. This has the side effect of setting the introPart
 *         field to the new value.
 */
/* package */
IIntroPart createNewIntroPart() throws CoreException {
    IntroDescriptor introDescriptor = workbench.getIntroDescriptor();
    introPart = introDescriptor == null ? null : introDescriptor.createIntro();
    if (introPart != null) {
        workbench.getExtensionTracker().registerObject(introDescriptor.getConfigurationElement().getDeclaringExtension(), introPart, IExtensionTracker.REF_WEAK);
    }
    return introPart;
}
Also used : IntroDescriptor(org.eclipse.ui.internal.intro.IntroDescriptor)

Example 3 with IntroDescriptor

use of org.eclipse.ui.internal.intro.IntroDescriptor in project eclipse.platform.ui by eclipse-platform.

the class IntroPartTest method doSetUp.

@Override
protected void doSetUp() throws Exception {
    super.doSetUp();
    oldDesc = Workbench.getInstance().getIntroDescriptor();
    IntroDescriptor testDesc = getIntroDesc();
    Workbench.getInstance().setIntroDescriptor(testDesc);
}
Also used : IntroDescriptor(org.eclipse.ui.internal.intro.IntroDescriptor)

Example 4 with IntroDescriptor

use of org.eclipse.ui.internal.intro.IntroDescriptor in project eclipse.platform.ui by eclipse-platform.

the class IntroTest method doSetUp.

@Override
protected void doSetUp() throws Exception {
    super.doSetUp();
    // these tests rely on the 3.2 behavior for sticky views
    IPreferenceStore preferenceStore = PrefUtil.getAPIPreferenceStore();
    preferenceStore.putValue(IWorkbenchPreferenceConstants.ENABLE_32_STICKY_CLOSE_BEHAVIOR, "true");
    oldDesc = Workbench.getInstance().getIntroDescriptor();
    IntroDescriptor testDesc = (IntroDescriptor) WorkbenchPlugin.getDefault().getIntroRegistry().getIntro("org.eclipse.ui.testintro");
    Workbench.getInstance().setIntroDescriptor(testDesc);
    window = openTestWindow();
}
Also used : IntroDescriptor(org.eclipse.ui.internal.intro.IntroDescriptor) IPreferenceStore(org.eclipse.jface.preference.IPreferenceStore)

Example 5 with IntroDescriptor

use of org.eclipse.ui.internal.intro.IntroDescriptor in project eclipse.platform.ui by eclipse-platform.

the class IntroTest2 method doSetUp.

@Override
protected void doSetUp() throws Exception {
    super.doSetUp();
    // these tests rely on the 3.3 behavior for sticky views
    IPreferenceStore preferenceStore = PrefUtil.getAPIPreferenceStore();
    preferenceStore.putValue(IWorkbenchPreferenceConstants.ENABLE_32_STICKY_CLOSE_BEHAVIOR, "false");
    oldDesc = Workbench.getInstance().getIntroDescriptor();
    IntroDescriptor testDesc = (IntroDescriptor) WorkbenchPlugin.getDefault().getIntroRegistry().getIntro("org.eclipse.ui.testintro");
    Workbench.getInstance().setIntroDescriptor(testDesc);
    window = openTestWindow();
}
Also used : IntroDescriptor(org.eclipse.ui.internal.intro.IntroDescriptor) IPreferenceStore(org.eclipse.jface.preference.IPreferenceStore)

Aggregations

IntroDescriptor (org.eclipse.ui.internal.intro.IntroDescriptor)6 IPreferenceStore (org.eclipse.jface.preference.IPreferenceStore)2 Workbench (org.eclipse.ui.internal.Workbench)2 ReferenceQueue (java.lang.ref.ReferenceQueue)1 WeakReference (java.lang.ref.WeakReference)1 CoreException (org.eclipse.core.runtime.CoreException)1 IIntroDescriptor (org.eclipse.ui.internal.intro.IIntroDescriptor)1 IIntroPart (org.eclipse.ui.intro.IIntroPart)1 Test (org.junit.Test)1