Package org.eclipse.ui

Examples of org.eclipse.ui.IWorkingSetManager


        _lblworkingSets.setEnabled(true);
        _selectWorkingSet.setEnabled(true);


        IWorkingSetManager manager = PlatformUI.getWorkbench().getWorkingSetManager();

        String[] ids = new String[manager.getAllWorkingSets().length];
        int i = 0;
        for (IWorkingSet c : manager.getAllWorkingSets()) {
            ids[i] = c.getId();
            i++;
        }       
       
View Full Code Here


            }
            final String[] wsIds = settings.getArray("workingSets");

            IWorkingSet[] workingSets = null;
            if (wsIds != null && wsIds.length > 0) {
                final IWorkingSetManager workingSetManager = PlatformUI.getWorkbench()
                        .getWorkingSetManager();
                workingSets = new IWorkingSet[wsIds.length];
                for (int i = 0; workingSets != null && i < wsIds.length; i++) {
                    workingSets[i] = workingSetManager.getWorkingSet(wsIds[i]);
                    if (workingSets[i] == null) {
                        workingSets = null;
                    }
                }
            }
View Full Code Here

        if (_tripleNotEquals) {
          final Set<IWorkingSet> workingSets = new HashSet<IWorkingSet>(2);
          for (int j = 0; (j < lruWorkingSetNames.length); j++) {
            {
              IWorkbench _workbench = PlatformUI.getWorkbench();
              IWorkingSetManager _workingSetManager = _workbench.getWorkingSetManager();
              String _get = lruWorkingSetNames[j];
              final IWorkingSet workingSet = _workingSetManager.getWorkingSet(_get);
              boolean _tripleNotEquals_1 = (workingSet != null);
              if (_tripleNotEquals_1) {
                workingSets.add(workingSet);
              }
            }
View Full Code Here

    boolean _tripleEquals_1 = (shell == null);
    if (_tripleEquals_1) {
      return null;
    }
    IWorkbench _workbench_1 = PlatformUI.getWorkbench();
    IWorkingSetManager _workingSetManager = _workbench_1.getWorkingSetManager();
    final IWorkingSetSelectionDialog dialog = _workingSetManager.createWorkingSetSelectionDialog(shell, true);
    int _open = dialog.open();
    boolean _notEquals = (_open != Window.OK);
    if (_notEquals) {
      throw new InterruptedException();
    }
View Full Code Here

      }
    }
  }

  void restoreWorkingSet() {
    IWorkingSetManager manager = getManager();
    if (manager == null) {
      throw new IllegalStateException();
    }
    IMemento[] workingSetReferences = workingSetMemento
        .getChildren(IWorkbenchConstants.TAG_WORKING_SET);
    ArrayList list = new ArrayList(workingSetReferences.length);

    for (int i = 0; i < workingSetReferences.length; i++) {
      IMemento setReference = workingSetReferences[i];
      String setId = setReference.getID();
      IWorkingSet set = manager.getWorkingSet(setId);
      if (set != null) {
        list.add(set);
      }
    }
    internalSetComponents((IWorkingSet[]) list
View Full Code Here

        .append(WorkingSetManager.WORKING_SET_STATE_FILENAME);

    File stateFile = new File(dataLocation.toOSString());

    try {
      IWorkingSetManager manager = PlatformUI.getWorkbench()
          .getWorkingSetManager();
      if (manager instanceof AbstractWorkingSetManager)
        ((AbstractWorkingSetManager) manager).saveState(stateFile);
      else
        return new Status(IStatus.ERROR, WorkbenchPlugin.PI_WORKBENCH,
View Full Code Here

   * (non-Javadoc)
   *
   * @see org.eclipse.ui.IWorkingSet#adaptElements(org.eclipse.core.runtime.IAdaptable[])
   */
  public IAdaptable[] adaptElements(IAdaptable[] objects) {
    IWorkingSetManager manager = getManager();
    if (manager instanceof WorkingSetManager) {
      WorkingSetDescriptor descriptor = getDescriptor(null);
      if (descriptor == null || !descriptor.isElementAdapterClassLoaded())
        return objects;
      return ((WorkingSetManager) manager).getElementAdapter(
View Full Code Here

        MenuItem mi = new MenuItem(menu, SWT.RADIO, index);
        mi.setText("&" + id + " " + workingSet.getLabel()); //$NON-NLS-1$  //$NON-NLS-2$
        mi.setSelection(workingSet.equals(actionGroup.getWorkingSet()));
        mi.addSelectionListener(new SelectionAdapter() {
            public void widgetSelected(SelectionEvent e) {
                IWorkingSetManager manager = PlatformUI.getWorkbench()
                        .getWorkingSetManager();
                actionGroup.setWorkingSet(workingSet);
                manager.addRecentWorkingSet(workingSet);
            }
        });
        if (image == null) {
      ImageDescriptor imageDescriptor = workingSet.getImageDescriptor();
      if (imageDescriptor != null)
View Full Code Here

    }
  }
 
  public IWorkingSet getAggregateWorkingSet() {
    if (aggregateWorkingSet == null) {
      IWorkingSetManager workingSetManager = PlatformUI.getWorkbench()
          .getWorkingSetManager();
      aggregateWorkingSet = (AggregateWorkingSet) workingSetManager.getWorkingSet(
              getAggregateWorkingSetId());
      if (aggregateWorkingSet == null) {
        aggregateWorkingSet = (AggregateWorkingSet) workingSetManager
            .createAggregateWorkingSet(
                getAggregateWorkingSetId(),
                WorkbenchMessages.WorkbenchPage_workingSet_default_label,
                getWorkingSets());
        workingSetManager.addWorkingSet(aggregateWorkingSet);
      }
    }
    return aggregateWorkingSet;
  }
View Full Code Here

      }
     
      String[] wsIds= settings.getArray("workingSets"); //$NON-NLS-1$
      IWorkingSet[] workingSets= null;
      if (wsIds != null && wsIds.length > 0) {
        IWorkingSetManager workingSetManager= PlatformUI.getWorkbench().getWorkingSetManager();
        workingSets= new IWorkingSet[wsIds.length];
        for (int i= 0; workingSets != null && i < wsIds.length; i++) {
          workingSets[i]= workingSetManager.getWorkingSet(wsIds[i]);
          if (workingSets[i] == null) {
            workingSets= null;
          }
        }
      }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.IWorkingSetManager

Copyright © 2018 www.massapicom. 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.