Package org.eclipse.jface.viewers

Examples of org.eclipse.jface.viewers.IStructuredSelection.toList()


                ServerRegistry serverRegistry = ApplicationRegistry.getServerRegistry(MBeanView.getServer());
                IStructuredSelection ss = (IStructuredSelection)_tableViewer.getSelection();
                if(!ss.isEmpty())
                {
                    //clear selected Notifications
                    serverRegistry.clearNotifications(null, ss.toList());
                }
                else if(_notifications != null)
                {
                    //clear all the notifications, if there are any
                   
View Full Code Here


    boolean canRemove = true;
    if (folders == null)
      canRemove = false;
    else {
      List list = selection.toList();
      for (Iterator iterator = list.iterator(); iterator.hasNext();) {
        Object o = iterator.next();
        if (!folders.contains(o))
          canRemove = false;
        break;
View Full Code Here

  }

  public void dragSetData(DragSourceEvent event) {
    IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
    Object[] list = selection.toList().toArray();
    for (Object object : list) {
      if (object instanceof FeatureTreeNode) {
        event.data = ((FeatureTreeNode) object).getValue();
      } else if (object instanceof AnnotationTreeNode) {
        event.data = ((AnnotationTreeNode) object).getAnnotation().getCoveredText();
View Full Code Here

    final ITargetScope scope = getCurrentActiveScope();
    if(scope == null) {
      return;
    }
    final IStructuredSelection ss = (IStructuredSelection) viewer.getSelection();
    for(Object ob: ss.toList()) {
      URI uri = elementToURI(ob);
      if(uri != null) {
        handleSelectedURI(scope, uri);
      }
    }
View Full Code Here

      return false;
    }
   
    final IStructuredSelection ss = (IStructuredSelection) viewer.getSelection();
    final List<URI> uris = new ArrayList<URI>();
    for(Object ob : ss.toList()) {
      URI uri = elementToURI(ob);
      if(uri != null) {
        uris.add(uri);
      }
    }
View Full Code Here

  private SelectionListener createSelectionListenerButtonRemove() {
    return new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        IStructuredSelection selection = (IStructuredSelection) tableViewerBreakpoints.getSelection();
        for(Object ob: selection.toList()) {
          if((ob instanceof IHttpCondition) && (conditionSet != null))
            conditionSet.removeCondition((IHttpCondition) ob, true);     
        }
        tableViewerBreakpoints.refresh(true);
      }
View Full Code Here

  private SelectionListener createSelectionListenerButtonRemove() {
    return new SelectionAdapter() {
      public void widgetSelected(SelectionEvent e) {
        IStructuredSelection selection = (IStructuredSelection) treeViewer.getSelection();
        for(Object element: selection.toList()) {
          if(element instanceof IHttpCondition) {
            conditionSet.removeCondition((IHttpCondition) element, false);
            conditionSetDirty = true;
          } else if (element instanceof IHttpConditionType) {
            IHttpConditionType type = (IHttpConditionType) element;
View Full Code Here

    removeResourceButton.setLayoutData(gd);
    removeResourceButton.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        IStructuredSelection selection = (IStructuredSelection) resourcesTreeViewer.getSelection();
        for (Object element : selection.toList()) {
          if (element instanceof IResource) {
            IResource res = (IResource) element;
            try {
              res.getParent().removeResource(res.getId());
            } catch (ResourceException e1) {
View Full Code Here

        }

        final IStructuredSelection selection = (IStructuredSelection)bootFeaturesViewer.getSelection();

        @SuppressWarnings("unchecked")
        final List<String> selectionList = selection.toList();
        final String[] movedBootFeatures = new String[bootFeaturesList.size()];

        for (final String config : selectionList) {
            final int i = bootFeaturesList.indexOf(config);
            movedBootFeatures[i + direction] = config;
View Full Code Here

                    @SuppressWarnings("unchecked")
                    @Override
                    public void selectionChanged(SelectionChangedEvent event) {
                        IStructuredSelection selection = (IStructuredSelection) event
                                .getSelection();
                        selectedObjects.addAll(selection.toList());
                    }
                });

        // first execute column selection with default configuration to see that
        // all rows get selected
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.