Examples of IWorkingSet


Examples of org.eclipse.ui.IWorkingSet

        .getWorkingSetManager().getWorkingSets()));
        List initialElementSelections = getInitialElementSelections();
    if (multiSelect) {
      listViewer.setCheckedElements(initialElementSelections.toArray());
    } else if (!initialElementSelections.isEmpty()) {
      IWorkingSet set = (IWorkingSet) initialElementSelections.get(0);
      if (set instanceof AggregateWorkingSet) {
        AggregateWorkingSet aggregate = (AggregateWorkingSet) set;
        listViewer.setCheckedElements(aggregate.getComponents());
      }
      else {
View Full Code Here

Examples of org.eclipse.ui.IWorkingSet

   
    return composite;
    }

    private int getInitialRadioSelection() {
        IWorkingSet windowSet = workbenchWindow.getActivePage().getAggregateWorkingSet();
       
        int selectionIndex;
        if (getSelection() != null && getSelection().length > 0) {
          if (windowSet.equals(getSelection()[0])) {
            selectionIndex = 0;
          }
          else {
            selectionIndex = 2;
          }
View Full Code Here

Examples of org.eclipse.ui.IWorkingSet

      }
      else {
        String setId = getAggregateIdForSets(typedResult);
        IWorkingSetManager workingSetManager = workbenchWindow
            .getWorkbench().getWorkingSetManager();
        IWorkingSet aggregate = workingSetManager
            .getWorkingSet(setId);
        if (aggregate == null) {
          aggregate = workingSetManager
              .createAggregateWorkingSet(
                  setId,
View Full Code Here

Examples of org.eclipse.ui.IWorkingSet

     */
    private void restoreChangedWorkingSets() {
        Iterator iterator = getEditedWorkingSets().keySet().iterator();

        while (iterator.hasNext()) {
            IWorkingSet editedWorkingSet = (IWorkingSet) iterator.next();
            IWorkingSet originalWorkingSet = (IWorkingSet) getEditedWorkingSets()
                    .get(editedWorkingSet);

            if (editedWorkingSet.getName().equals(originalWorkingSet.getName()) == false) {
                editedWorkingSet.setName(originalWorkingSet.getName());
            }
            if (editedWorkingSet.getElements().equals(
                    originalWorkingSet.getElements()) == false) {
                editedWorkingSet.setElements(originalWorkingSet.getElements());
            }
        }
    }
View Full Code Here

Examples of org.eclipse.ui.IWorkingSet

      this.workingSetIds = workingSetIds;
    }
   
    public boolean select(Viewer viewer, Object parentElement, Object element) {
        if (element instanceof IWorkingSet) {
            IWorkingSet workingSet = (IWorkingSet) element;
      String id = workingSet.getId();
            //if (!workingSet.isVisible())
            //  return false;
            if (workingSetIds != null && id != null) {
                return workingSetIds.contains(id);
            }
View Full Code Here

Examples of org.eclipse.ui.IWorkingSet

        Separator item = new Separator();
        menuItems.add(item);
      }
      IWorkingSet[] sets = typedSets[i];
      for (int j = 0; j < sets.length; j++) {
        IWorkingSet set = sets[j];

        Set existingElements = new HashSet();
        existingElements.addAll(Arrays
            .asList(set.getElements()));

        boolean visible = false;
        IAdaptable [] adaptables = new IAdaptable[selectedElements.length];
        System.arraycopy(selectedElements, 0, adaptables, 0, selectedElements.length);
        adaptables = set.adaptElements(adaptables);
        if (adaptables.length > 0 && add) {
          for (int k = 0; k < adaptables.length; k++) {
            if (!existingElements.contains(adaptables[k])) {
              // show if any element is not present in
              // addition
View Full Code Here

Examples of org.eclipse.ui.IWorkingSet

   
      dialog.create();
      PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(),
          IWorkbenchHelpContextIds.WORKING_SET_NEW_WIZARD);
      if (dialog.open() == Window.OK) {
        IWorkingSet workingSet = wizard.getSelection();
        if(workingSet != null) {
          manager.addWorkingSet(workingSet);
        }
      }     
    }
View Full Code Here

Examples of org.eclipse.ui.IWorkingSet

   * @see org.eclipse.ui.dialogs.IWorkingSetPage
   */
  void editSelectedWorkingSet() {
    IWorkingSetManager manager = WorkbenchPlugin.getDefault()
        .getWorkingSetManager();
    IWorkingSet editWorkingSet = (IWorkingSet) getSelectedWorkingSets()
        .get(0);
    IWorkingSetEditWizard wizard = manager
        .createWorkingSetEditWizard(editWorkingSet);
    WizardDialog dialog = new WizardDialog(getShell(), wizard);
    IWorkingSet originalWorkingSet = (IWorkingSet) editedWorkingSets
        .get(editWorkingSet);
    boolean firstEdit = originalWorkingSet == null;

    // save the original working set values for restoration when selection
    // dialog is cancelled.
View Full Code Here

Examples of org.eclipse.ui.IWorkingSet

    dialog.create();
    PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(),
        IWorkbenchHelpContextIds.WORKING_SET_NEW_WIZARD);
    if (dialog.open() == Window.OK) {
      IWorkingSet workingSet = wizard.getSelection();
      manager.addWorkingSet(workingSet);
      addedWorkingSets.add(workingSet);
      availableWorkingSetsChanged();
    }
  }
View Full Code Here

Examples of org.eclipse.ui.IWorkingSet

    newButton.setEnabled(registry.hasNewPageWorkingSetDescriptor());

    removeButton.setEnabled(hasSelection);

    IWorkingSet selectedWorkingSet = null;
    if (hasSelection) {
      hasSingleSelection = selection.size() == 1;
      if (hasSingleSelection) {
        selectedWorkingSet = (IWorkingSet) selection
            .get(0);
      }
    }
    detailsButton.setEnabled(hasSingleSelection
        && selectedWorkingSet.isEditable());

    getOkButton().setEnabled(true);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.