Examples of IWorkingSet


Examples of org.eclipse.ui.IWorkingSet

      return null;
    }

        Iterator iter = workingSets.iterator();
        while (iter.hasNext()) {
            IWorkingSet workingSet = (IWorkingSet) iter.next();
            if (name.equals(workingSet.getName())) {
        return workingSet;
      }
        }
        return null;
    }
View Full Code Here

Examples of org.eclipse.ui.IWorkingSet

        // so that on restoration all necessary aggregate components can be found.
       
        ArrayList standardSets = new ArrayList();
        ArrayList aggregateSets = new ArrayList();
        while (iterator.hasNext()) {
            IWorkingSet set = (IWorkingSet) iterator.next();
            if (set instanceof AggregateWorkingSet) {
          aggregateSets.add(set);
        } else {
          standardSets.add(set);
        }
View Full Code Here

Examples of org.eclipse.ui.IWorkingSet

     */
    protected void restoreWorkingSetState(IMemento memento) {
        IMemento[] children = memento
                .getChildren(IWorkbenchConstants.TAG_WORKING_SET);
        for (int i = 0; i < children.length; i++) {
            IWorkingSet workingSet = restoreWorkingSet(children[i]);
            if (workingSet != null) {
              internalAddWorkingSet(workingSet);
            }
        }
    }
View Full Code Here

Examples of org.eclipse.ui.IWorkingSet

     */
    protected void saveMruList(IMemento memento) {
        Iterator iterator = recentWorkingSets.iterator();

        while (iterator.hasNext()) {
            IWorkingSet workingSet = (IWorkingSet) iterator.next();
            IMemento mruMemento = memento
                    .createChild(IWorkbenchConstants.TAG_MRU_LIST);

            mruMemento.putString(IWorkbenchConstants.TAG_NAME, workingSet
                    .getName());
        }
    }
View Full Code Here

Examples of org.eclipse.ui.IWorkingSet

        for (int i = mruWorkingSets.length - 1; i >= 0; i--) {
            String workingSetName = mruWorkingSets[i]
                    .getString(IWorkbenchConstants.TAG_NAME);
            if (workingSetName != null) {
                IWorkingSet workingSet = getWorkingSet(workingSetName);
                if (workingSet != null) {
                    internalAddRecentWorkingSet(workingSet);
                }
            }
        }
View Full Code Here

Examples of org.eclipse.ui.IWorkingSet

          if (workingSets.size() == 0) {
            continue;
          }
          IWorkingSetUpdater updater = getUpdater(descriptor);
          for (Iterator iter = workingSets.iterator(); iter.hasNext();) {
            IWorkingSet workingSet = (IWorkingSet) iter.next();
            if (!updater.contains(workingSet)) {
              updater.add(workingSet);
            }
          }
        }
View Full Code Here

Examples of org.eclipse.ui.IWorkingSet

  }

  private List getWorkingSetsForId(String id) {
    List result= new ArrayList();
      for (Iterator iter= workingSets.iterator(); iter.hasNext();) {
        IWorkingSet ws= (IWorkingSet)iter.next();
        if (id.equals(ws.getId())) {
        result.add(ws);
      }
    }
      return result;
  }
View Full Code Here

Examples of org.eclipse.ui.IWorkingSet

        Collections.sort(sortedWorkingSets, new WorkingSetComparator());

        Iterator iter = sortedWorkingSets.iterator();
        mruMenuCount = 0;
        while (iter.hasNext()) {
            IWorkingSet workingSet = (IWorkingSet) iter.next();
            if (workingSet != null) {
                IContributionItem item = new WorkingSetMenuContributionItem(
                        ++mruMenuCount, this, workingSet);
                menuManager.insertBefore(SEPARATOR_ID, item);
            }
View Full Code Here

Examples of org.eclipse.ui.IWorkingSet

     * Sets the current working set.
     *
     * @param newWorkingSet the new working set
     */
    public void setWorkingSet(IWorkingSet newWorkingSet) {
        IWorkingSet oldWorkingSet = workingSet;

        workingSet = newWorkingSet;
        // Update action
        clearWorkingSetAction.setEnabled(newWorkingSet != null);
        editWorkingSetAction.setEnabled(newWorkingSet != null && newWorkingSet.isEditable());
View Full Code Here

Examples of org.eclipse.ui.IWorkingSet

    }
    String workingSetName = memento.getString(TAG_WORKING_SET_NAME);
    boolean hasWorkingSetName = workingSetName != null
        && workingSetName.length() > 0;

    IWorkingSet ws = null;
    // First handle name if present.
    if (hasWorkingSetName) {
      ws = PlatformUI.getWorkbench().getWorkingSetManager()
          .getWorkingSet(workingSetName);
    } else if (isWindowWorkingSet && page != null) {
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.