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

项目:team-explorer-everywhere    文件:GitImportWizardSelectProjectsPage.java   
private void selectWorkingSet() {
    final IWorkingSetSelectionDialog workingSetDialog =
        PlatformUI.getWorkbench().getWorkingSetManager().createWorkingSetSelectionDialog(getShell(), false);

    if (workingSetDialog.open() != IDialogConstants.OK_ID) {
        return;
    }

    final IWorkingSet[] selection = workingSetDialog.getSelection();
    final IWorkingSet set = selection.length == 0 ? null : selection[0];

    computeWorkingSets(set);

    if (selection.length > 0) {
        selectWorkingSet(set);
    }
}
项目:team-explorer-everywhere    文件:TfsImportWizardTreePage.java   
private void selectWorkingSet() {
    final IWorkingSetSelectionDialog workingSetDialog =
        PlatformUI.getWorkbench().getWorkingSetManager().createWorkingSetSelectionDialog(getShell(), false);

    if (workingSetDialog.open() != IDialogConstants.OK_ID) {
        return;
    }

    final IWorkingSet[] selection = workingSetDialog.getSelection();
    final IWorkingSet set = selection.length == 0 ? null : selection[0];

    computeWorkingSets(set);

    if (selection.length > 0) {
        selectWorkingSet(set);
    }
}
项目:subclipse    文件:GlobalRefreshResourceSelectionPage.java   
private void selectWorkingSetAction() {
    IWorkingSetManager manager = PlatformUI.getWorkbench().getWorkingSetManager();
    IWorkingSetSelectionDialog dialog = manager.createWorkingSetSelectionDialog(getShell(), true);
    dialog.open();
    IWorkingSet[] sets = dialog.getSelection();
    if(sets != null) {
        workingSets = sets;
    } else {
        // dialog cancelled
        return;
    }
    updateWorkingSetScope();
    updateWorkingSetLabel();

    participantScope.setSelection(false);
    selectedResourcesScope.setSelection(false);
    workingSetScope.setSelection(true);
}
项目:APICloud-Studio    文件:GlobalRefreshResourceSelectionPage.java   
private void selectWorkingSetAction() {
    IWorkingSetManager manager = PlatformUI.getWorkbench().getWorkingSetManager();
    IWorkingSetSelectionDialog dialog = manager.createWorkingSetSelectionDialog(getShell(), true);
    dialog.open();
    IWorkingSet[] sets = dialog.getSelection();
    if(sets != null) {
        workingSets = sets;
    } else {
        // dialog cancelled
        return;
    }
    updateWorkingSetScope();
    updateWorkingSetLabel();

    participantScope.setSelection(false);
    selectedResourcesScope.setSelection(false);
    workingSetScope.setSelection(true);
}
项目:Eclipse-Postfix-Code-Completion    文件:SelectWorkingSetAction.java   
@Override
public void run() {
    Shell shell= getShell();
    IWorkingSetManager manager= PlatformUI.getWorkbench().getWorkingSetManager();
    IWorkingSetSelectionDialog dialog= manager.createWorkingSetSelectionDialog(shell, false);
    IWorkingSet workingSet= fActionGroup.getWorkingSet();
    if (workingSet != null)
        dialog.setSelection(new IWorkingSet[]{workingSet});

    if (dialog.open() == Window.OK) {
        IWorkingSet[] result= dialog.getSelection();
        if (result != null && result.length > 0) {
            fActionGroup.setWorkingSet(result[0], true);
            manager.addRecentWorkingSet(result[0]);
        }
        else
            fActionGroup.setWorkingSet(null, true);
    }
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:SelectWorkingSetAction.java   
@Override
public void run() {
    Shell shell= getShell();
    IWorkingSetManager manager= PlatformUI.getWorkbench().getWorkingSetManager();
    IWorkingSetSelectionDialog dialog= manager.createWorkingSetSelectionDialog(shell, false);
    IWorkingSet workingSet= fActionGroup.getWorkingSet();
    if (workingSet != null)
        dialog.setSelection(new IWorkingSet[]{workingSet});

    if (dialog.open() == Window.OK) {
        IWorkingSet[] result= dialog.getSelection();
        if (result != null && result.length > 0) {
            fActionGroup.setWorkingSet(result[0], true);
            manager.addRecentWorkingSet(result[0]);
        }
        else
            fActionGroup.setWorkingSet(null, true);
    }
}
项目:Eclipse-Postfix-Code-Completion    文件:JavaSearchScopeFactory.java   
public IWorkingSet[] queryWorkingSets() throws InterruptedException {
    Shell shell= JavaPlugin.getActiveWorkbenchShell();
    if (shell == null)
        return null;
    IWorkingSetSelectionDialog dialog= PlatformUI.getWorkbench().getWorkingSetManager().createWorkingSetSelectionDialog(shell, true);
    if (dialog.open() != Window.OK) {
        throw new InterruptedException();
    }

    IWorkingSet[] workingSets= dialog.getSelection();
    if (workingSets.length > 0)
        return workingSets;
    return null; // 'no working set' selected
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:JavaSearchScopeFactory.java   
public IWorkingSet[] queryWorkingSets() throws InterruptedException {
    Shell shell= JavaPlugin.getActiveWorkbenchShell();
    if (shell == null)
        return null;
    IWorkingSetSelectionDialog dialog= PlatformUI.getWorkbench().getWorkingSetManager().createWorkingSetSelectionDialog(shell, true);
    if (dialog.open() != Window.OK) {
        throw new InterruptedException();
    }

    IWorkingSet[] workingSets= dialog.getSelection();
    if (workingSets.length > 0)
        return workingSets;
    return null; // 'no working set' selected
}
项目:gef-gwt    文件:IWorkingSetManager.java   
/**
 * @param parent
 *            the parent shell
 * @return the dialog
 * @deprecated use createWorkingSetSelectionDialog(parent, true) instead
 */
public IWorkingSetSelectionDialog createWorkingSetSelectionDialog(
        Shell parent);
项目:gef-gwt    文件:IWorkingSetManager.java   
/**
 * Creates a working set selection dialog that lists all working sets and
 * allows the user to add, remove and edit working sets. The caller is
 * responsible for opening the dialog with
 * <code>IWorkingSetSelectionDialog#open</code>, and subsequently extracting
 * the selected working sets using
 * <code>IWorkingSetSelectionDialog#getSelection</code>.
 * 
 * @param parentShell
 *            the parent shell of the working set selection dialog
 * @param multi
 *            true= <code>IWorkingSetSelectionDialog#getSelection()</code>
 *            returns the working sets chosen in the dialog as an array of
 *            working set. false=
 *            <code>IWorkingSetSelectionDialog#getSelection()</code> returns
 *            an array having a single aggregate working set of all working
 *            sets selected in the dialog.
 * @return a working set selection dialog
 */
public IWorkingSetSelectionDialog createWorkingSetSelectionDialog(
        Shell parentShell, boolean multi);
项目:gef-gwt    文件:IWorkingSetManager.java   
/**
 * Creates a working set selection dialog that lists all working sets with
 * the specified ids and allows the user to add, remove and edit working
 * sets with the specified ids. The caller is responsible for opening the
 * dialog with <code>IWorkingSetSelectionDialog#open</code>, and
 * subsequently extracting the selected working sets using
 * <code>IWorkingSetSelectionDialog#getSelection</code>.
 * 
 * @param parentShell
 *            the parent shell of the working set selection dialog
 * @param multi
 *            true= <code>IWorkingSetSelectionDialog#getSelection()</code>
 *            returns the working sets chosen in the dialog as an array of
 *            working set. false=
 *            <code>IWorkingSetSelectionDialog#getSelection()</code> returns
 *            an array having a single aggregate working set of all working
 *            sets selected in the dialog.
 * @param workingsSetIds
 *            a list of working set ids which are valid workings sets to be
 *            selected, created, removed or edited, or <code>null</code> if
 *            all currently available working set types are valid
 * @return a working set selection dialog
 * @since 3.1
 */
public IWorkingSetSelectionDialog createWorkingSetSelectionDialog(
        Shell parentShell, boolean multi, String[] workingsSetIds);