Examples of EList


Examples of org.eclipse.emf.common.util.EList

    EAnnotation eannot = aEEnum.getEAnnotation("http://uima.apache.org");
    if (eannot != null) {
      type.setDescription((String) eannot.getDetails().get("description"));
    }
    // set allowed values
    EList literals = aEEnum.getELiterals();
    AllowedValue[] vals = new AllowedValue[literals.size()];
    for (int i = 0; i < literals.size(); i++) {
      EEnumLiteral literal = (EEnumLiteral) literals.get(i);
      vals[i] = uimaFactory.createAllowedValue();
      vals[i].setString(literal.getName());
      EAnnotation literalAnnot = literal.getEAnnotation("http://uima.apache.org");
      if (literalAnnot != null) {
        vals[i].setDescription((String) literalAnnot.getDetails().get("description"));
View Full Code Here

Examples of org.eclipse.emf.common.util.EList

   * <!-- end-user-doc -->
   * @generated NOT
   */
  public List getChangedDataObjects()
  {
    EList result = new UniqueEList.FastCompare(getDeletedObjects());
    result.addAll(getObjectsToDetach());
    for (Iterator i = getObjectChanges().iterator(); i.hasNext(); )
    {
      Map.Entry entry = (Map.Entry)i.next();
      result.add(entry.getKey());
    }
    return result;
  }
View Full Code Here

Examples of org.eclipse.emf.common.util.EList

        if (resolves.isEmpty()) {
            // Identifier lookup is being inconsistent; this often happens when code trips up over
            // converting URLs to and from Files
            throw new IOException("Could not find " + layerResourceID + " in local catalog");
        }
        EList resources = new EDataTypeUniqueEList(IGeoResource.class, this,
                ProjectPackage.LAYER__GEO_RESOURCES);
        LayerResource preferredResource = null;
        for (IResolve resolve : resolves) {
            if (resolve instanceof IGeoResource) {
                LayerResource layerResource = new LayerResource((LayerImpl) layer,
                        (IGeoResource) resolve);
                if (resolve.getID().equals(layerResourceID)) {
                    resources.add(0, layerResource);
                } else {
                    resources.add(layerResource);
                }
                if (resolve == resource) {
                    preferredResource = layerResource;
                }
            }
View Full Code Here

Examples of org.eclipse.emf.common.util.EList

            }
        }
        if (IMap.class.isAssignableFrom(adapter)) {
            return getMap();
        }
        EList adapters = eAdapters();
        if (adapters instanceof SynchronizedEList) {
            ((SynchronizedEList) adapters).lock();
        }
        try {
            for (Iterator i = adapters.iterator(); i.hasNext();) {
                Object o = i.next();
                if (adapter.isAssignableFrom(o.getClass()))
                    return o;
            }
        } finally {
View Full Code Here

Examples of org.eclipse.emf.common.util.EList

                if (notification.getFeatureID(ContextModel.class) != ProjectPackage.CONTEXT_MODEL__LAYERS)
                    return;

                // we need to tell the map item provider that the layers have changed.
                ContextModel model = (ContextModel) notifier;
                EList adapters = model.getMap().eAdapters();
                for (Object object : adapters) {
                    if (object instanceof MapItemProvider) {
                        MapItemProvider mapItemProvider = ((MapItemProvider) object);
                        //                        mapItemProvider.updateChildList(notification);
                        mapItemProvider.getChildFetcher().notifyChanged();
View Full Code Here

Examples of org.eclipse.emf.common.util.EList

    public void setUp() throws Exception {
        ProjectRegistry registry = ProjectPlugin.getPlugin().getProjectRegistry();
        List<Project> projects = registry.getProjects();
        registry.getProjects().removeAll(projects);
       
        EList list=registry.eResource().getResourceSet().getResources();
        Set<Resource> toRemove=new HashSet<Resource>();
        for (Iterator iter = list.iterator(); iter.hasNext();) {
            Resource element = (Resource) iter.next();
            if( element!=registry.eResource() ){
                element.unload();
                toRemove.add(element);
            }
View Full Code Here

Examples of org.eclipse.emf.common.util.EList

  }
 
  @Ignore
  @Test
    public void testSaveAndLoad() throws Exception {
    EList list=project.eResource().getResourceSet().getResources();
   
    for (Iterator iter = list.iterator(); iter.hasNext();) {
      Resource element = (Resource) iter.next();
            try{
                element.save(null);
            }catch (Exception e) {
            }
View Full Code Here

Examples of org.eclipse.emf.common.util.EList

    /**
     * Prints diagnostic messages.
     * @param schema
     */
    private static void printDiagnostics(XSDSchema schema) {
        EList diagnositcs = schema.getAllDiagnostics();
        System.out.println("diagnositcs.size() = " + diagnositcs.size());
        for (int i = 0; i < diagnositcs.size(); i++) {
            XSDDiagnosticImpl diag = (XSDDiagnosticImpl) diagnositcs.get(i);
            System.out.println(diag.getMessage());

            if (diag.getNode() != null) {
                System.out.println("\tnode name : " + diag.getNode().getLocalName());
                NamedNodeMap map = diag.getNode().getAttributes();
View Full Code Here

Examples of org.eclipse.emf.common.util.EList

    public Set getGlobalTypeNames() {
        if (_schema == null) {
            return null;
        }
        Set returns = new HashSet();
        EList list = _schema.getTypeDefinitions();
        for (int i = 0; i < list.size(); i++) {
            XSDTypeDefinition definition = (XSDTypeDefinition) list.get(i);
            returns.add(definition.getName());
        }
        return returns;
    }
View Full Code Here

Examples of org.eclipse.emf.common.util.EList

    public Set getGlobalElementNames() {
        if (_schema == null) {
            return null;
        }
        Set returns = new HashSet();
        EList list = _schema.getElementDeclarations();
        for (int i = 0; i < list.size(); i++) {
            XSDElementDeclaration element = (XSDElementDeclaration) list.get(i);
            returns.add(element.getName());
        }
        return returns;
    }
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.