Examples of IWorkingSet


Examples of org.eclipse.ui.IWorkingSet

  protected void removeSelectedWorkingSets(List selection) {
    IWorkingSetManager manager = WorkbenchPlugin.getDefault()
        .getWorkingSetManager();
    Iterator iter = selection.iterator();
    while (iter.hasNext()) {
      IWorkingSet workingSet = (IWorkingSet) iter.next();
      if (getAddedWorkingSets().contains(workingSet)) {
        getAddedWorkingSets().remove(workingSet);
      } else {
        IWorkingSet[] recentWorkingSets = manager
            .getRecentWorkingSets();
        for (int i = 0; i < recentWorkingSets.length; i++) {
          if (workingSet.equals(recentWorkingSets[i])) {
            getRemovedMRUWorkingSets().add(workingSet);
            break;
          }
        }
        getRemovedWorkingSets().add(workingSet);
View Full Code Here

Examples of org.eclipse.ui.IWorkingSet

    IWorkingSet[][] typedSets = splitSets();

    for (int i = 0; i < typedSets.length; i++) {
      IWorkingSet[] sets = typedSets[i];
      for (int j = 0; j < sets.length; j++) {
        IWorkingSet set = sets[j];

        // only add visible sets
        // if (set.isVisible()) {
        ActionContributionItem item = new ActionContributionItem(
            new ToggleWorkingSetAction(set));
View Full Code Here

Examples of org.eclipse.ui.IWorkingSet

     * @see Action#run
     */
    public void run() {
        IWorkingSetManager manager = PlatformUI.getWorkbench()
                .getWorkingSetManager();
        IWorkingSet workingSet = actionGroup.getWorkingSet();

        if (workingSet == null) {
            setEnabled(false);
            return;
        }
View Full Code Here

Examples of org.eclipse.ui.IWorkingSet

    public void run() {
        IWorkingSetManager manager = PlatformUI.getWorkbench()
                .getWorkingSetManager();
        IWorkingSetSelectionDialog dialog = manager
                .createWorkingSetSelectionDialog(shell, false);
        IWorkingSet workingSet = actionGroup.getWorkingSet();

        if (workingSet != null) {
      dialog.setSelection(new IWorkingSet[] { workingSet });
    }
View Full Code Here

Examples of org.eclipse.ui.IWorkingSet

        super.dispose();
    }

    public Image getImage(Object object) {
        Assert.isTrue(object instanceof IWorkingSet);
        IWorkingSet workingSet = (IWorkingSet) object;
        ImageDescriptor imageDescriptor = workingSet.getImageDescriptor();

        if (imageDescriptor == null) {
      return null;
    }
View Full Code Here

Examples of org.eclipse.ui.IWorkingSet

        return icon;
    }

    public String getText(Object object) {
        Assert.isTrue(object instanceof IWorkingSet);
        IWorkingSet workingSet = (IWorkingSet) object;
        return workingSet.getLabel();
    }
View Full Code Here

Examples of org.eclipse.ui.IWorkingSet

    }

    private Set<IResource> getResources(Object parent) {
        Set<IResource> resources = new HashSet<IResource>();
        if (parent instanceof IWorkingSet) {
            IWorkingSet workingSet = (IWorkingSet) parent;
            IAdaptable[] elements = workingSet.getElements();
            // elements may contain NON-resource elements, which we have to
            // convert to
            // resources
            for (IAdaptable adaptable : elements) {
                IResource resource = (IResource) adaptable.getAdapter(IResource.class);
View Full Code Here

Examples of org.eclipse.ui.IWorkingSet

        rootElement.dispose();
        clearFilters();

        IPreferenceStore store = FindbugsPlugin.getDefault().getPreferenceStore();
        store.setValue(FindBugsConstants.LAST_USED_GROUPING, getGrouping().toString());
        IWorkingSet workingSet = getCurrentWorkingSet();
        String name = workingSet != null ? workingSet.getName() : "";
        store.setValue(FindBugsConstants.LAST_USED_WORKING_SET, name);
    }
View Full Code Here

Examples of org.eclipse.ui.IWorkingSet

        rootElement.dispose();
        rootElement = new BugGroup(null, null, GroupType.Undefined, null);
        if (oldInput instanceof IWorkingSet || oldInput instanceof IWorkspaceRoot) {
            viewer.setInput(oldInput);
        } else {
            IWorkingSet workingSet = getCurrentWorkingSet();
            if (workingSet != null) {
                viewer.setInput(workingSet);
            } else {
                viewer.setInput(ResourcesPlugin.getWorkspace().getRoot());
            }
View Full Code Here

Examples of org.eclipse.ui.IWorkingSet

            System.out.println("Restore state!");
        }
    }

    protected void initWorkingSet(String workingSetName) {
        IWorkingSet workingSet = null;

        if (workingSetName != null && workingSetName.length() > 0) {
            IWorkingSetManager workingSetManager = PlatformUI.getWorkbench().getWorkingSetManager();
            workingSet = workingSetManager.getWorkingSet(workingSetName);
        } /*
 
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.