Package org.eclipse.jface.viewers

Examples of org.eclipse.jface.viewers.StructuredSelection.toArray()


        ISelection selection = pathViewer.getSelection();
        if (!(selection instanceof StructuredSelection)) {
          return;
        }
        StructuredSelection s = (StructuredSelection) selection;
        for (Object o : s.toArray() ) {
          try {
            String item = (String) o;
            pathViewer.remove(item);
            namespace.remove(item);
          } catch (Exception e2) {
View Full Code Here


  }

  protected Object[] getDrivers() {
      StructuredSelection sel = (StructuredSelection) listViewer
        .getSelection();
      return sel.toArray();
  }

  protected String getPoolName() {
      return text[0].getText();
  }
View Full Code Here

  @SuppressWarnings("restriction")
  public Object[] getSelected(ISelection selection) {
    if (selection instanceof StructuredSelection) {
      StructuredSelection sel = (StructuredSelection) selection;
      List<Object> selected = Arrays.asList(sel.toArray());
      if (selected.size() == 0 || !(selected.get(0) instanceof ContainerShapeEditPart)) {
        return null;
      }

      PictogramLink link = ((ContainerShapeEditPart) selected.get(0)).getPictogramElement().getLink();
View Full Code Here

      public void selectionChanged(SelectionChangedEvent event) {
        ISelection selection = constructorCombo.getSelection();
        if (selection instanceof StructuredSelection) {
          StructuredSelection structuredSelection = (StructuredSelection) selection;
          Object[] items = structuredSelection.toArray();
          if (items.length == 1) {
            IMethod constructor = (IMethod) items[0];
            int numParam = constructor.getNumberOfParameters();
            int itemCount = constructorArgsTable.getItemCount();
            if (itemCount != numParam) {
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.