Java 类org.eclipse.ui.dialogs.IWorkingSetNewWizard 实例源码

项目:Eclipse-Postfix-Code-Completion    文件:WorkingSetConfigurationDialog.java   
private void createWorkingSet() {
    IWorkingSetManager manager= PlatformUI.getWorkbench().getWorkingSetManager();
    IWorkingSetNewWizard wizard= manager.createWorkingSetNewWizard(new String[] {IWorkingSetIDs.JAVA});
    // the wizard can't be null since we have at least the Java working set.
    WizardDialog dialog= new WizardDialog(getShell(), wizard);
    dialog.create();
    if (dialog.open() == Window.OK) {
        IWorkingSet workingSet= wizard.getSelection();
        if (WorkingSetModel.isSupportedAsTopLevelElement(workingSet)) {
            fAllWorkingSets.add(workingSet);
            fTableViewer.add(workingSet);
            fTableViewer.setSelection(new StructuredSelection(workingSet), true);
            fTableViewer.setChecked(workingSet, true);
            manager.addWorkingSet(workingSet);
            fAddedWorkingSets.add(workingSet);
        }
    }
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:WorkingSetConfigurationDialog.java   
private void createWorkingSet() {
    IWorkingSetManager manager= PlatformUI.getWorkbench().getWorkingSetManager();
    IWorkingSetNewWizard wizard= manager.createWorkingSetNewWizard(new String[] {IWorkingSetIDs.JAVA});
    // the wizard can't be null since we have at least the Java working set.
    WizardDialog dialog= new WizardDialog(getShell(), wizard);
    dialog.create();
    if (dialog.open() == Window.OK) {
        IWorkingSet workingSet= wizard.getSelection();
        if (WorkingSetModel.isSupportedAsTopLevelElement(workingSet)) {
            fAllWorkingSets.add(workingSet);
            fTableViewer.add(workingSet);
            fTableViewer.setSelection(new StructuredSelection(workingSet), true);
            fTableViewer.setChecked(workingSet, true);
            manager.addWorkingSet(workingSet);
            fAddedWorkingSets.add(workingSet);
        }
    }
}
项目:gef-gwt    文件:IWorkingSetManager.java   
/**
 * Creates a working set new wizard. The wizard will allow creating new
 * working sets. Returns <code>null</code> if there aren't any working set
 * definitions that support creation of working sets.
 * <p>
 * Example: <code>
 *   IWorkingSetNewWizard wizard= workingSetManager.createWorkingSetNewWizard(null);
 *   if (wizard != null) {  
 *       WizardDialog dialog = new WizardDialog(shell, wizard);
 * 
 *       dialog.create();       
 *       if (dialog.open() == Window.OK) {      
 *          ...
 *       }
 *   }
 * </code>
 * </p>
 * 
 * @param workingSetIds
 *            a list of working set ids which are valid workings sets to be
 *            created or <code>null</code> if all currently available
 *            working set types are valid
 * 
 * @return the working set new wizard or <code>null</code>
 * 
 * @since 3.1
 */
public IWorkingSetNewWizard createWorkingSetNewWizard(String[] workingSetIds);