Package org.eclipse.jface.viewers

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


  @SuppressWarnings("unchecked")
  public List<IResource> getMergeGraphs() {
    IStructuredSelection selection =
        (IStructuredSelection) graphView.getSelection();
    return selection.toList();
  }

  private TableViewer setupTableViewer(Composite container) {
    TableViewer graphTable = new TableViewer(
        container, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER);
View Full Code Here


               * feedback constants (even though it converts in
               * the other direction as well)
               */
              float feedbackFloat = getHeightInItem(event);

              final DragNodeCommand command = new DragNodeCommand(event.item.getData(), feedbackFloat, event.operations, event.detail, selection.toList(), treeViewer);
              if (command != null && command.canExecute()) {
                SafeRunnable.run(new SafeRunnable() {
                  public void run() throws Exception {
                    command.execute();
                  }
View Full Code Here

  public void fillContextMenu(IMenuManager menuManager, ISelection selection) {
    try {
      List selectionList = new ArrayList();
      if (selection instanceof IStructuredSelection) {
        IStructuredSelection es = (IStructuredSelection) selection;
        selectionList.addAll(es.toList());
      }

      contributeActions(menuManager, selectionList);
    }
    catch (Exception e) {
View Full Code Here

  public void performDelete() {
    ISelection selection = tableViewer.getSelection();
    if (selection instanceof IStructuredSelection) {
      IStructuredSelection structuredSelection = (IStructuredSelection) selection;
      namespaceInfoList.removeAll(structuredSelection.toList());
      updateErrorMessage(namespaceInfoList);
      performDelayedUpdate();
    }
  }
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

                    if (_mbean == null)
                        return;
                   
                    IStructuredSelection ss = (IStructuredSelection)_tableViewer.getSelection();
                    ServerRegistry serverRegistry = ApplicationRegistry.getServerRegistry(_mbean);
                    serverRegistry.clearNotifications(_mbean, ss.toList());
                    refresh();
                }
            });
       
        // Add Refresh Button
View Full Code Here

                public void widgetSelected(SelectionEvent e)
                { 
                    //TODO : Get selected rows and clear those
                    IStructuredSelection ss = (IStructuredSelection)_tableViewer.getSelection();
                    ServerRegistry serverRegistry = ApplicationRegistry.getServerRegistry(MBeanView.getServer());
                    serverRegistry.clearNotifications(null, ss.toList());
                    refresh();
                }
            });
       
        // Add Refresh Button
View Full Code Here

    sb.append(headers[CoverageView.COLUMN_TOTAL]).append(Text.DELIMITER);

    // Rows:
    final IStructuredSelection selection = (IStructuredSelection) selectionSource
        .getSelection();
    for (final Object element : selection.toList()) {
      appendColumn(sb, element, CoverageView.COLUMN_ELEMENT).append(SWT.TAB);
      appendColumn(sb, element, CoverageView.COLUMN_RATIO).append(SWT.TAB);
      appendColumn(sb, element, CoverageView.COLUMN_COVERED).append(SWT.TAB);
      appendColumn(sb, element, CoverageView.COLUMN_MISSED).append(SWT.TAB);
      appendColumn(sb, element, CoverageView.COLUMN_TOTAL).append(
View Full Code Here

    sb.append(headers[CoverageView.COLUMN_TOTAL]).append(Text.DELIMITER);

    // Rows:
    final IStructuredSelection selection = (IStructuredSelection) selectionSource
        .getSelection();
    for (final Object element : selection.toList()) {
      sb.append(converter.getElementName(element)).append(SWT.TAB);
      sb.append(converter.getRatio(element)).append(SWT.TAB);
      sb.append(converter.getCovered(element)).append(SWT.TAB);
      sb.append(converter.getMissed(element)).append(SWT.TAB);
      sb.append(converter.getTotal(element)).append(Text.DELIMITER);
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.