Examples of toArray()


Examples of org.eclipse.core.internal.runtime.ReferenceHashSet.toArray()

      ReferenceHashSet associatedObjects = (ReferenceHashSet) extensionToObjects.remove(delta.getExtension());
      if (associatedObjects == null)
        return;
      //Copy the objects early so we don't hold the lock too long
      removedObjects = associatedObjects.toArray();
    }
    notify(delta, removedObjects);
  }

  protected void applyRemove(IExtensionChangeHandler handler, IExtension removedExtension, Object[] removedObjects) {
View Full Code Here

Examples of org.eclipse.emf.common.util.BasicEList.toArray()

                  "Unknown error", e);
        }
        if (opt != null)
          elist.add(opt);
      }
      Object[] res = elist.toArray();
      return res;
    }

    /*
     * @see ITreeContentProvider#hasChildren(Object)
View Full Code Here

Examples of org.eclipse.emf.common.util.EList.toArray()

                  "Unknown error", e);
        }
        if (opt != null)
          elist.add(opt);
      }
      Object[] res = elist.toArray();
      return res;
    }

    /*
     * @see ITreeContentProvider#hasChildren(Object)
View Full Code Here

Examples of org.eclipse.equinox.internal.provisional.p2.query.Collector.toArray()

            Collector collector = new Collector();
            Query query = new InstallableUnitQuery(featureInfo.getFeatureID(),
                    new VersionRange(Version.create(featureInfo.getFeatureVersion()),
                            true, Version.create(featureInfo.getFeatureVersion()), true));
            collector = RepositoryUtils.getInstallableUnitsInRepositories(null, query, collector, null);
            IInstallableUnit[] units = (IInstallableUnit[]) collector.toArray(IInstallableUnit.class);

            if (units[0] == null) {
                continue;
            }
View Full Code Here

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

    removeButton.setEnabled(false);
    removeButton.addSelectionListener(new SelectionAdapter() {
      @Override
      public void widgetSelected(SelectionEvent e) {
        IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
        Object[] selectedURLs = selection.toArray();
        for (Object selectedURL : selectedURLs) {
          urls.remove(selectedURL);
          update();
        }
      }
View Full Code Here

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

    /* Look for the minimal Index of all selected Elements */
    int minSelectedIndex = Integer.MAX_VALUE;
    TreeItemAdapter parentOfMinSelected = new TreeItemAdapter(tree);

    /* For each selected Element */
    Object[] selectedElements = selection.toArray();
    for (Object selectedElement : selectedElements) {
      Widget widget = findItem(selectedElement);
      if (widget instanceof TreeItem) {
        TreeItem item = (TreeItem) widget;
        TreeItemAdapter parent = new TreeItemAdapter(item).getParent();
View Full Code Here

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

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

    selectedBean = null;
    selectedFile = null;

    if (selection instanceof TreeSelection) {
      TreeSelection treeSelection = (TreeSelection) selection;
      Object[] objects = treeSelection.toArray();
      if (objects != null && objects.length == 1) {
        if (objects[0] instanceof IBean) {
          IBean bean = (IBean) objects[0];
          IResource resource = bean.getElementResource();
          if (resource instanceof IFile) {
View Full Code Here

Examples of org.eclipse.jst.jsf.common.sets.AxiomaticSet.toArray()

        {
            return Diagnostic.OK_INSTANCE;
        }

        return new BasicDiagnostic(Diagnostic.ERROR, this.getClass().getName(),
            0, Messages.MemberConstraint_Failure, complement.toArray());
    }

}
View Full Code Here

Examples of org.eclipse.persistence.internal.helper.IdentityHashSet.toArray()

                discoverAndPersistUnregisteredNewObjects(clonesEnum.next(), false, newObjects, unregisteredExistingObjects, visitedObjects, cascadePersistErrors);
            }
            // EL Bug 343925 - Throw IllegalStateException with all unregistered objects which
            // are not marked with CascadeType.PERSIST after iterating through all mappings.
            if (!cascadePersistErrors.isEmpty()) {
                throw new IllegalStateException(ExceptionLocalization.buildMessage("new_object_found_during_commit", cascadePersistErrors.toArray()));
            }
        }
    }
   
    /**
 
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.