Examples of eClass()


Examples of org.eclipse.emf.ecore.EObject.eClass()

   
    // make sure that if we test for something that isn't an edge, it does
    // throw an exception.
    try {
      EObject node = getNonEdgeNode();
      assertFalse("Node was actually an edge", getEdgeTypes().containsKey(node.eClass().getName()));
      GetShortcuts.getTargetElement(node, true);
      fail("Should have failed for a non-edge node");
    } catch (IllegalArgumentException e) {
      // expected
    }
View Full Code Here

Examples of org.eclipse.emf.ecore.EObject.eClass()

    if (monitor.isCanceled())
      return Status.CANCEL_STATUS;
   
    // check instance
    if (!(model instanceof GMFConfiguration)) {
      return errorStatus("Loaded model was not an instance of GMFConfiguration: " + model.eClass().getName());
    }
   
    // check that container is a folder
    monitor.subTask("Generating source code");
    SimpleGMFCodeGenerator gen = new SimpleGMFCodeGenerator();
View Full Code Here

Examples of org.eclipse.emf.ecore.EObject.eClass()

    EObject target = part.resolveSemanticElement();
    String suggestedName = suggestName(target);

    String fileExtension = getFileExtension(target);
    if (fileExtension == null) {
      return errorStatus("Cannot move the given object '" + target.eClass().getName() + "' into a separate file." );
    }

    String location = target.eResource().getURI().toPlatformString(true);
    IStructuredSelection selection = new StructuredSelection(ResourcesPlugin.getWorkspace().getRoot().findMember( location ));
View Full Code Here

Examples of org.eclipse.emf.ecore.EObject.eClass()

     
      // now find unused features
      TreeIterator<EObject> it = root.eAllContents();
      while (it.hasNext()) {
        EObject e = it.next();
        EClass cls = e.eClass();
        // check all attributes
        for (EAttribute attr : cls.getEAllAttributes()) {
          // is it non-default?
          if (e.eGet(attr) != attr.getDefaultValue()) {
            // yes; remove it from the unused features (if it exists)
View Full Code Here

Examples of org.eclipse.emf.ecore.EObject.eClass()

  public Object evaluate(EObject root) {
    int result = get(root);
    TreeIterator<EObject> it = root.eAllContents();
    while (it.hasNext()) {
      EObject next = it.next();
      if (ignoreClass(next.eClass()))
        continue;
     
      result += get(next);
    }
    return result;
View Full Code Here

Examples of org.eclipse.emf.ecore.EObject.eClass()

      } else if (cur instanceof TemplateFile) {
        extra = ((TemplateFile) cur).getName();
      } else if (cur instanceof DroolsPackage) {
        extra = ((DroolsPackage) cur).getName();
      }
      parentPath = " > " + cur.eClass().getName() + "[" + extra + "]" + parentPath;        
      cur = cur.eContainer();
    }
   
    if (tag.getJavaParent() == null) {
      return tag.toString() + parentPath;
View Full Code Here

Examples of org.eclipse.emf.ecore.EObject.eClass()

  protected Collection<EObject> removeIgnoredClasses(Collection<EObject> nodes) {
    Collection<EObject> result = new ArrayList<EObject>(nodes.size());
    Iterator<EObject> it = nodes.iterator();
    while (it.hasNext()) {
      EObject n = it.next();
      if (ignoreClass(n.eClass()))
        continue// ignore
     
      result.add(n);
    }
    return result;
View Full Code Here

Examples of org.eclipse.emf.ecore.EStructuralFeature.eClass()

    for (int index = 0; index < last; index++)
    {
      EStructuralFeature otherEStructuralFeature = (EStructuralFeature)eStructuralFeatures.get(index);
      if (name.equals(extendedMetaData.getName(otherEStructuralFeature)))
      {
        if (otherEStructuralFeature.eClass() != eStructuralFeature.eClass())
        {
          //System.out.println("###EStructuralFeature mismatch: ");
          //System.out.println("    old: " + extendedMetaData.getName(otherEStructuralFeature));
          //System.out.println("    new: " + extendedMetaData.getName(eStructuralFeature));
          continue;
View Full Code Here

Examples of org.eclipse.emf.ecore.InternalEObject.eClass()

      if (!hasInstanceClass())
      {
        return
          internalEObject.eInverseAdd
            (owner,
             internalEObject.eClass().getFeatureID(getInverseEReference()),
             null,
             notifications);
      }
      else
      {
View Full Code Here

Examples of org.eclipse.emf.ecore.change.ChangeDescription.eClass()

        Property declaration = changeSummaryElementNS == null
                             ? rootObject.getType().getProperty(changeSummaryElementName)
                             : xsdHelper.getGlobalProperty(changeSummaryElementNS, changeSummaryElementName, true);
        if (declaration != null)
        {
            EClassifier type = changeDescription.eClass();
            if (type != declaration.getType() && type != CHANGE_SUMMARY)
                writeGlobalAttribute(ExtendedMetaData.XSI_PREFIX, ExtendedMetaData.XSI_URI, XMLResource.TYPE, new StringBuffer(prefix(extendedMetaData.getNamespace(type), null))
                        .append(':').append(extendedMetaData.getName(type)).toString());
        }
       
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.