Package fr.tm.elibel.smartqvt.qvt.emof

Examples of fr.tm.elibel.smartqvt.qvt.emof.Type


    }
    if (modelObj instanceof Property) {
      res = QVTEditorUtilities.stringOfTypedElement((Property) modelObj);
    }

    Type type = null;
    if (modelObj instanceof VariableExp) {
      type = ((VariableExp) modelObj).getType();
      modelObj = ((VariableExp) modelObj).getReferredVariable();
    }
    if (modelObj instanceof Variable) {
      res = QVTEditorUtilities.stringOfTypedElement((Variable) modelObj, type);
      if ((Variable) modelObj instanceof VarParameter)
        res = ((VarParameter)modelObj).getKind().getLiteral() + " " + res;
    }
    if (modelObj instanceof OperationCallExp) {
      OperationCallExp ope = (OperationCallExp) modelObj;
      if ((ope.getReferredOperation() != null)
          && ("T".equals(ope.getReferredOperation().getType()
              .getName()))) {
        type = ope.getSource().getType();
        if (type instanceof CollectionType) {
          Type elemType = ((CollectionType) type).getElementType();
          if (elemType != null)
            type = elemType;
        }
      }
      modelObj = ope.getReferredOperation();
View Full Code Here


   */
  @SuppressWarnings("unchecked")
  private List<Object> getProposalsForObject(Object obj) {
    List<Object> objects = new ArrayList<Object>();
    if ((obj != null) && (obj instanceof TypedElement)) {
      Type type = ((TypedElement) obj).getType();
      if (type != null) {
        if (type instanceof Class) {
          Class cl = (Class) type;
          objects.addAll(getObjectsOf(cl));
          objects.addAll(getObjectsFromSuperClassOf(cl));
        }

        if (fCompletionType == COMPLETION_ELEMENT) {
          if (type instanceof OperationalTransformation) {
            for (Iterator iter = ((OperationalTransformation) type)
                .getModuleImport().iterator(); iter.hasNext();) {
              ModuleImport mod = (ModuleImport) iter.next();
              objects
                  .addAll(getObjectsOf(mod
                      .getImportedModule()));
            }
          }
          for (Iterator iter = getOclQvtTypes().iterator(); iter
              .hasNext();) {
            Type t = (Type) iter.next();
            if ((t instanceof Class) && (t.getName() != null)) {
              if ((type instanceof ModelType)
                  && (t.getName().equals("Model"))) {
                objects.addAll(getObjectsOf((Class) t));
              }
              if (t.getName().equals(type.getName())) {
                objects.addAll(getObjectsOf((Class) t));
              }
            }
          }
        }
        if ((fCompletionType == COMPLETION_COLLECTION)
            || (fCompletionType == COMPLETION_COLLECTION_COMPLETE)) {

          if (type instanceof CollectionType) {
            Type elementtype = ((CollectionType) type)
                .getElementType();
            if (elementtype instanceof Class) {
              objects.addAll(getObjectsOf((Class) elementtype));
            }
          }
          for (Iterator iter = getOclQvtTypes().iterator(); iter
              .hasNext();) {
            Type t = (Type) iter.next();
            if (t instanceof Class) {
              Class cl = (Class) t;
              if ((type.getName().startsWith(cl.getName() + "("))) {
                objects.addAll(getObjectsOf(cl));
              }
              if ("Collection".equals(t.getName())) {
                objects.addAll(getObjectsOf(cl));
              }
            }
          }
        }
View Full Code Here

      for (Iterator iter = var2.iterator(); iter.hasNext();) {
        Object var3 = iter.next();
        if (var3 instanceof VariableInitExp)
          objects.add(((VariableInitExp) var3).getReferredVariable());
        else if (var3 instanceof TypedElement) {
          Type t = ((TypedElement) var3).getType();
          if ((t != null) && (t instanceof Class)) {
            objects.addAll(getObjectsOf((Class) t));
          }
        }
      }
View Full Code Here

        NamedElement elem = (NamedElement) obj;
        image_id = UiPlugin.getImage(UiPlugin.IMAGE_COMPLETION);
        pattern = elem.getName();
        name = elem.getName();
        if (elem instanceof Type) {
          Type t = (Type) elem;
          image_id = UiPlugin.getImage(UiPlugin.IMAGE_TYPE);
          if ((t.eContainer() != null)
              && (t.eContainer() instanceof NamedElement))
            description = ((NamedElement) t.eContainer()).getName();
        }
        if (elem instanceof TypedElement) {
          TypedElement typedElem = (TypedElement) elem;
          image_id = UiPlugin.getImage(UiPlugin.IMAGE_TYPE);
          if (typedElem.getType() != null) {
View Full Code Here

      }
    }
    signature.append("(");
    Iterator types = t.iterator();
    while (types.hasNext()) {
      Type type = (Type) types.next();
      signature.append(",");
      signature.append(type.toString());
    }
    signature.append(")");
    signature.append(currentPackage.toString());
    Helper result = (Helper) getHelperHM.get(signature.toString());
    if (result == null) {
View Full Code Here

      }
    }
    signature.append("(");
    Iterator types = t.iterator();
    while (types.hasNext()) {
      Type type = (Type) types.next();
      signature.append(",");
      signature.append(type.toString());
    }
    signature.append(")");
    signature.append(currentPackage.toString());
    Helper result = (Helper) getHelperVoidHM.get(signature.toString());
    if (result == null) {
View Full Code Here

    signature.append(".");
    signature.append(op);
    signature.append("(");
    Iterator types = t.iterator();
    while (types.hasNext()) {
      Type type = (Type) types.next();
      signature.append("|");
      signature.append(type.toString());
    }
    signature.append(")");
    Operation result = (Operation) getOperationHM.get(signature.toString());
    if (result == null) {
      result = super.getOperation(self, op, t, cVariables,
View Full Code Here

      }
    }
    signature.append("(");
    Iterator types = t.iterator();
    while (types.hasNext()) {
      Type type = (Type) types.next();
      signature.append("|");
      signature.append(type.toString());
    }
    signature.append(")");
    signature.append(currentPackage.toString());
    MappingOperation result = (MappingOperation) getMappingHM.get(signature
        .toString());
View Full Code Here

      }
    }
    signature.append("(");
    Iterator types = t.iterator();
    while (types.hasNext()) {
      Type type = (Type) types.next();
      signature.append("|");
      signature.append(type.toString());
    }
    signature.append(")");
    signature.append(currentPackage.toString());
    MappingOperation result = (MappingOperation) getMappingVoidHM
        .get(signature.toString());
View Full Code Here

      }
    }
    signature.append("(");
    Iterator types = t.iterator();
    while (types.hasNext()) {
      Type type = (Type) types.next();
      signature.append("|");
      signature.append(type.toString());
    }
    signature.append(")");
    signature.append(currentPackage.toString());
    Constructor result = (Constructor) getConstructorHM.get(signature
        .toString());
View Full Code Here

TOP

Related Classes of fr.tm.elibel.smartqvt.qvt.emof.Type

Copyright © 2018 www.massapicom. 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.