Package org.eclipse.jface.viewers

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


        if (selection instanceof IStructuredSelection) {
            final IStructuredSelection structuredSelection = (IStructuredSelection) selection;
            final IErlModel model = ErlangEngine.getInstance().getModel();
            try {
                model.open(null);
                for (final Object i : structuredSelection.toList()) {
                    if (i instanceof IResource) {
                        final IResource r = (IResource) i;
                        modules.addAll(DialyzerUtils.collectModulesFromResource(model, r));
                    }
                }
View Full Code Here


    @SuppressWarnings("unchecked")
    private void updateModel() {
        IStructuredSelection selection = (IStructuredSelection)viewer.getSelection();
        if (!selection.isEmpty()) {
            List<String> resources = new ArrayList<String>();
            List<TreeObject> nodes = selection.toList();
            for (TreeObject o:nodes) {
                if (o.getNodeType() == TreeObject.Type.RESOURCE) {
                    resources.add(o.getFullPath());
                }
            }
View Full Code Here

     */
    protected void okPressed() {
        // Build a list of selected children.
        IStructuredSelection selection = (IStructuredSelection) fTableViewer
                .getSelection();
        setResult(selection.toList());
        super.okPressed();
    }

    /**
     * Returns the initial height of the dialog in number of characters.
View Full Code Here

   * @return the {@link List} of selected elements.
   */
  @SuppressWarnings("unchecked")
  private List<Object> getSelectedElements() {
    IStructuredSelection selection = (IStructuredSelection) m_viewer.getSelection();
    return selection.toList();
  }

  ////////////////////////////////////////////////////////////////////////////
  //
  // GUI: buttons
View Full Code Here

                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

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

        }
    }

    void doRemove() {
        IStructuredSelection selection = (IStructuredSelection) selectedViewer.getSelection();
        for (Object clause : selection.toList()) {
            selectedBundles.remove(((VersionedClause) clause).getName());
        }
        selectedViewer.remove(selection.toArray());
        availableViewer.refresh();
        propSupport.firePropertyChange(PROP_SELECTION, null, selectedBundles);
View Full Code Here

                resources.addAll(CorePlugin.stringsToURLs((String[]) data));
            }
        } else if (data instanceof IStructuredSelection) {
            IStructuredSelection selection = (IStructuredSelection) data;

            resources.addAll(selection.toList());
        } else {
            resources.add(data);
        }

        return MapFactory.instance().processResources(null, resources);
View Full Code Here

            if(selection instanceof IStructuredSelection) {
                IStructuredSelection ss = (IStructuredSelection)selection;
                logger.trace("ss: " + ss);

                selectedParticipants.clear();
                for(Object obj : ss.toList()) {
                    logger.trace("obj: " + obj);

                    if(obj instanceof EncounterParticipant) {
                        selectedParticipants.add((EncounterParticipant)obj);
                    }
View Full Code Here

            if(selection instanceof IStructuredSelection) {
                IStructuredSelection ss = (IStructuredSelection)selection;
                logger.trace("ss: " + ss);

                selectedParticipants.clear();
                for(Object obj : ss.toList()) {
                    logger.trace("obj: " + obj);

                    if(obj instanceof ObjectInstance) {
                        selectedParticipants.add((ObjectInstance)obj);
                    }
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.