Package org.eclipse.ui

Examples of org.eclipse.ui.IWorkingSet


   
   

    private String computeSelectedWorkingSet(Object selection) {
        if (selection instanceof IWorkingSet){
            IWorkingSet workingSet = (IWorkingSet) selection;
            return workingSet.getName();
        }
    
       
        if (selection instanceof IResource){
            IResource resource = (IResource) selection;
View Full Code Here


                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;
                }

                Image icon = (Image) images.get(imageDescriptor);
                return icon;
            }

            public String getText(Object object) {
                Assert.isTrue(object instanceof IWorkingSet);
                IWorkingSet workingSet = (IWorkingSet) object;
                return workingSet.getLabel();
            }
        }
        viewer.setLabelProvider(new WorkingSetLabelProvider());

        viewer.setContentProvider(new ArrayContentProvider());
View Full Code Here

                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

                return icon;
            }

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

                        final String property = event.getProperty();

                        if (WorkingSetFilterActionGroup.CHANGE_WORKING_SET
                                .equals(property)) {

                            IWorkingSet workingSet = (IWorkingSet) event.getNewValue();

                            if (workingSet != null
                                    && !(workingSet.isAggregateWorkingSet() && workingSet
                                            .isEmpty())) {
                                workingSetFilter.setWorkingSet(workingSet);
                                setSubtitle(workingSet.getLabel());
                            } else {
                                final IWorkbenchWindow window = PlatformUI.getWorkbench()
                                        .getActiveWorkbenchWindow();

                                if (window != null) {
                                    final IWorkbenchPage page = window.getActivePage();
                                    workingSet = page.getAggregateWorkingSet();

                                    if (workingSet.isAggregateWorkingSet()
                                            && workingSet.isEmpty()) {
                                        workingSet = null;
                                    }
                                }

                                workingSetFilter.setWorkingSet(workingSet);
View Full Code Here

        StringBuilder _append_2 = _append_1.append(surround);
        return _append_2.append(", ");
      }
    };
    final Function1<IWorkingSet, StringBuilder> cb = _function;
    IWorkingSet _head = IterableExtensions.<IWorkingSet>head(((Iterable<IWorkingSet>)Conversions.doWrapArray(workingSets)));
    boolean _tripleNotEquals = (_head != null);
    if (_tripleNotEquals) {
      IWorkingSet _head_1 = IterableExtensions.<IWorkingSet>head(((Iterable<IWorkingSet>)Conversions.doWrapArray(workingSets)));
      cb.apply(_head_1);
    }
    Iterable<IWorkingSet> _tail = IterableExtensions.<IWorkingSet>tail(((Iterable<IWorkingSet>)Conversions.doWrapArray(workingSets)));
    IWorkingSet _head_2 = IterableExtensions.<IWorkingSet>head(_tail);
    boolean _tripleNotEquals_1 = (_head_2 != null);
    if (_tripleNotEquals_1) {
      Iterable<IWorkingSet> _tail_1 = IterableExtensions.<IWorkingSet>tail(((Iterable<IWorkingSet>)Conversions.doWrapArray(workingSets)));
      IWorkingSet _head_3 = IterableExtensions.<IWorkingSet>head(_tail_1);
      cb.apply(_head_3);
    }
    int _length = workingSets.length;
    boolean _greaterThan = (_length > 2);
    if (_greaterThan) {
View Full Code Here

          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

    for (final IWorkingSet[] workingSets : _get) {
      {
        int _length = workingSets.length;
        final String[] names = new String[_length];
        for (int j = 0; (j < workingSets.length); j++) {
          IWorkingSet _get_1 = workingSets[j];
          String _name = _get_1.getName();
          names[j] = _name;
        }
        settingsStore.put((SearchUtil.STORE_LRU_WORKING_SET_NAMES + Integer.valueOf(i)), names);
        i++;
      }
View Full Code Here

            Object element = it.next();
            boolean projectCollected = collectProject(containers, retrieveSetups, element);
            if (projectCollected) {
                onlyContainers = false;
            } else {
                IWorkingSet workingSet = (IWorkingSet) IvyPlugin.adapt(element, IWorkingSet.class);
                if (workingSet != null) {
                    onlyContainers = false;
                    IAdaptable[] elements = workingSet.getElements();
                    for (int i = 0; i < elements.length; i++) {
                        collectProject(containers, retrieveSetups, elements[i]);
                    }
                } else if (element instanceof ClassPathContainer) {
                    collectContainer(containers, (ClassPathContainer) element);
View Full Code Here

     * @see org.eclipse.ui.IWorkingSetManager
     */
    public IWorkingSet[] getWorkingSets() {
        SortedSet visibleSubset = new TreeSet(WorkingSetComparator.INSTANCE);
        for (Iterator i = workingSets.iterator(); i.hasNext();) {
        IWorkingSet workingSet = (IWorkingSet) i.next();
        if (workingSet.isVisible()) {
          visibleSubset.add(workingSet);
        }
      }
        return (IWorkingSet[]) visibleSubset.toArray(new IWorkingSet[visibleSubset.size()]);
    }
View Full Code Here

TOP

Related Classes of org.eclipse.ui.IWorkingSet

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.