Example usage for org.eclipse.jface.util Policy setComparator

List of usage examples for org.eclipse.jface.util Policy setComparator

Introduction

In this page you can find the example usage for org.eclipse.jface.util Policy setComparator.

Prototype

public static void setComparator(Comparator<Object> comparator) 

Source Link

Document

Sets the comparator used by JFace to sort strings.

Usage

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);//from  w w  w  . j  a v  a2  s .  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  .ja v  a 2  s.co 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.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);//www.j a v  a 2 s. co m

    // 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: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);/*w ww .  j a va  2  s.  c  o  m*/

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

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