Example usage for org.eclipse.jface.dialogs TrayDialog setDialogHelpAvailable

List of usage examples for org.eclipse.jface.dialogs TrayDialog setDialogHelpAvailable

Introduction

In this page you can find the example usage for org.eclipse.jface.dialogs TrayDialog setDialogHelpAvailable.

Prototype

public static void setDialogHelpAvailable(boolean helpAvailable) 

Source Link

Document

Sets whether JFace dialogs that support help control should show the control by default.

Usage

From source file:carisma.ui.eclipse.CarismaGUI.java

License:Open Source License

/**
 * The Carisma constructor./*from   w w w. j av a2  s .  c om*/
 */
public CarismaGUI() {
    INSTANCE = this;
    this.editorRegistry = new EditorRegistry();
    Logger.setExternalLogPrinter(new EclipseLogPrinter());
    TrayDialog.setDialogHelpAvailable(true);
}

From source file:com.aptana.ide.rcp.IDEWorkbenchAdvisor.java

License:Open Source License

public void initialize(IWorkbenchConfigurer configurer) {

    PluginActionBuilder.setAllowIdeLogging(true);

    // make sure we always save and restore workspace state
    configurer.setSaveAndRestore(true);/*w w w  . j a va  2s.c o  m*/

    // register workspace adapters
    IDE.registerAdapters();

    // get the command line arguments
    String[] cmdLineArgs = Platform.getCommandLineArgs();

    // include the workspace location in the title
    // if the command line option -showlocation is specified
    for (int i = 0; i < cmdLineArgs.length; i++) {
        if ("-showlocation".equalsIgnoreCase(cmdLineArgs[i])) { //$NON-NLS-1$
            String name = null;
            if (cmdLineArgs.length > i + 1) {
                name = cmdLineArgs[i + 1];
            }
            if (name != null && name.indexOf("-") == -1) { //$NON-NLS-1$
                workspaceLocation = name;
            } else {
                workspaceLocation = Platform.getLocation().toOSString();
            }
            break;
        }
    }

    // register shared images
    declareWorkbenchImages();

    // initialize the activity helper
    activityHelper = IDEWorkbenchActivityHelper.getInstance();

    // initialize idle handler
    idleHelper = new IDEIdleHelper(configurer);

    // initialize the workspace undo monitor
    workspaceUndoMonitor = WorkspaceUndoMonitor.getInstance();

    // show Help button in JFace dialogs
    TrayDialog.setDialogHelpAvailable(true);

    Policy.setComparator(Collator.getInstance());
}

From source file:com.aptana.rcp.IDEWorkbenchAdvisor.java

License:Open Source License

/**
 * @see org.eclipse.ui.application.WorkbenchAdvisor#initialize
 *///w  w  w.  j  ava  2  s .c  o m
public void initialize(IWorkbenchConfigurer configurer) {
    PluginActionBuilder.setAllowIdeLogging(true);

    // make sure we always save and restore workspace state
    configurer.setSaveAndRestore(true);

    // register workspace adapters
    IDE.registerAdapters();

    // get the command line arguments
    String[] cmdLineArgs = Platform.getCommandLineArgs();

    // include the workspace location in the title
    // if the command line option -showlocation is specified
    for (int i = 0; i < cmdLineArgs.length; i++) {
        if ("-showlocation".equalsIgnoreCase(cmdLineArgs[i])) { //$NON-NLS-1$
            String name = null;
            if (cmdLineArgs.length > i + 1) {
                name = cmdLineArgs[i + 1];
            }
            if (name != null && name.indexOf("-") == -1) { //$NON-NLS-1$
                workspaceLocation = name;
            } else {
                workspaceLocation = Platform.getLocation().toOSString();
            }
            break;
        }
    }

    // register shared images
    declareWorkbenchImages();

    // initialize the activity helper
    activityHelper = IDEWorkbenchActivityHelper.getInstance();

    // initialize idle handler
    idleHelper = new IDEIdleHelper(configurer);

    // initialize the workspace undo monitor
    workspaceUndoMonitor = WorkspaceUndoMonitor.getInstance();

    // show Help button in JFace dialogs
    TrayDialog.setDialogHelpAvailable(true);

    Policy.setComparator(Collator.getInstance());
}

From source file:com.archimatetool.editor.ArchimateEditorWorkbenchAdvisor.java

License:Open Source License

@Override
public void initialize(IWorkbenchConfigurer configurer) {
    super.initialize(configurer);

    // Save and restore stuff
    configurer.setSaveAndRestore(true);/*from   w w  w .j a  v a  2 s. c  o  m*/

    // Rounded tabs are set on by default
    PlatformUI.getPreferenceStore().setDefault(IWorkbenchPreferenceConstants.SHOW_TRADITIONAL_STYLE_TABS,
            false);

    // Progress
    // PlatformUI.getPreferenceStore().setValue(IWorkbenchPreferenceConstants.SHOW_PROGRESS_ON_STARTUP, true);

    // Show Help Button by default on Dialogs
    TrayDialog.setDialogHelpAvailable(true);
}

From source file:com.astra.ses.spell.dev.advisor.ApplicationWorkbenchAdvisor.java

License:Open Source License

public void initialize(IWorkbenchConfigurer configurer) {

    // make sure we always save and restore workspace state
    configurer.setSaveAndRestore(true);//from  ww  w .j  a v a  2s  .  c  om

    // register workspace adapters
    WorkbenchAdapterBuilder.registerAdapters();

    // get the command line arguments
    String[] cmdLineArgs = Platform.getCommandLineArgs();

    // include the workspace location in the title
    // if the command line option -showlocation is specified
    for (int i = 0; i < cmdLineArgs.length; i++) {
        if ("-showlocation".equalsIgnoreCase(cmdLineArgs[i])) { //$NON-NLS-1$
            String name = null;
            if (cmdLineArgs.length > i + 1) {
                name = cmdLineArgs[i + 1];
            }
            if (name != null && name.indexOf("-") == -1) { //$NON-NLS-1$
                workspaceLocation = name;
            } else {
                workspaceLocation = Platform.getLocation().toOSString();
            }
            break;
        }
    }

    // register shared images
    declareWorkbenchImages();

    // initialize the activity helper
    activityHelper = IDEWorkbenchActivityHelper.getInstance();

    // initialize the workspace undo monitor
    workspaceUndoMonitor = WorkspaceUndoMonitor.getInstance();

    // show Help button in JFace dialogs
    TrayDialog.setDialogHelpAvailable(true);

    Policy.setComparator(Collator.getInstance());
}

From source file:de.ovgu.featureide.fm.ui.editors.featuremodel.operations.CalculateDependencyOperation.java

License:Open Source License

/**
 * Executes operation by calling feature model slicing and replacing the new root with the selected
 * feature. A wizard page presents the sub feature model and implicit constraints.
 *///from   w  w  w  .  j  av  a2  s  .com
@Override
protected FeatureIDEEvent operation() {
    ArrayList<String> subtreeFeatures = getSubtreeFeatures(subtreeRoot);
    boolean isCoreFeature = false;
    // feature model slicing 
    final Arguments arguments = new SliceFeatureModelJob.Arguments(null, completeFm, subtreeFeatures, true);
    SliceFeatureModelJob slice = new SliceFeatureModelJob(arguments);
    IFeatureModel slicedModel = slice.sliceModel(completeFm, subtreeFeatures, new NullMonitor()).clone(); // returns new feature model

    // only replace root with selected feature if feature is core-feature
    List<IFeature> coreFeatures = completeFm.getAnalyser().getCoreFeatures();
    if (coreFeatures.contains(subtreeRoot)) {
        isCoreFeature = true;
    }
    if (isCoreFeature) {
        FeatureUtils.replaceRoot(slicedModel, slicedModel.getFeature(subtreeRoot.getName()));
    }

    // Instantiating a wizard page, removing the help button and opening a wizard dialog
    final AbstractWizard wizard = new SubtreeDependencyWizard("Submodel Dependencies", slicedModel, completeFm);
    TrayDialog.setDialogHelpAvailable(false);
    final WizardDialog dialog = new WizardDialog(Display.getCurrent().getActiveShell(), wizard);
    dialog.open();
    resetExplanations();
    return new FeatureIDEEvent(completeFm, EventType.DEPENDENCY_CALCULATED, null, subtreeRoot);
}

From source file:org.apache.directory.studio.ApplicationWorkbenchAdvisor.java

License:Apache License

/**
 * Performs arbitrary initialization before the workbench starts running.<br />
 * <br />/*from   ww  w.j ava  2 s  .  co m*/
 * This method is called during workbench initialization prior to any windows 
 * being opened. Clients must not call this method directly (although super calls 
 * are okay). The default implementation does nothing. Subclasses may override. 
 * Typical clients will use the configurer passed in to tweak the workbench. If 
 * further tweaking is required in the future, the configurer may be obtained using 
 * getWorkbenchConfigurer
 */
public void initialize(IWorkbenchConfigurer configurer) {
    //enable the save/restore windows size & position feature
    configurer.setSaveAndRestore(true);

    //enable help button in dialogs 
    TrayDialog.setDialogHelpAvailable(true);
    ImageRegistry reg = JFaceResources.getImageRegistry();
    ImageDescriptor helpImage = PlatformUI.getWorkbench().getSharedImages()
            .getImageDescriptor(ISharedImages.IMG_LCL_LINKTO_HELP);
    reg.put(Dialog.DLG_IMG_HELP, helpImage);
}

From source file:org.eclipse.birt.report.designer.ui.rcp.DesignerApplication.java

License:Open Source License

/**
 * @see org.eclipse.core.runtime.IPlatformRunnable#run(java.lang.Object)
 *///from  w  ww.  j  a  v a 2s  .c o  m
public Object run(Object args) throws Exception {
    Display display = PlatformUI.createDisplay();
    TrayDialog.setDialogHelpAvailable(true);
    try {
        int code = PlatformUI.createAndRunWorkbench(display, new DesignerWorkbenchAdvisor());
        // exit the application with an appropriate return code
        return code == PlatformUI.RETURN_RESTART ? EXIT_RESTART : EXIT_OK;
    } finally {
        if (display != null)
            display.dispose();
    }
}

From source file:org.eclipse.tm.te.rcp.application.ApplicationWorkbenchAdvisor.java

License:Open Source License

@Override
public void initialize(IWorkbenchConfigurer configurer) {

    PluginActionBuilder.setAllowIdeLogging(false);

    // make sure we always save and restore workspace state
    configurer.setSaveAndRestore(true);/*from   w w w .j a v a2 s .c o  m*/

    // show Help button in JFace dialogs
    TrayDialog.setDialogHelpAvailable(true);

    Policy.setComparator(Collator.getInstance());
}

From source file:org.jboss.tools.runtime.ui.internal.wizard.DownloadRuntimesWizard.java

License:Open Source License

private void saveHelpAvailable() {
    helpAvailable = TrayDialog.isDialogHelpAvailable();
    TrayDialog.setDialogHelpAvailable(false);
}