Package no.hal.jex

Examples of no.hal.jex.JavaElement


    }
  }

  private void createRequirementsFromJavaModel(List javaElements, AbstractRequirement reqParent, int depth) throws Exception {
    for (int i = 0; i < javaElements.size(); i++) {
      JavaElement element = (JavaElement)javaElements.get(i);
      createRequirementsFromJavaModel(element, reqParent, depth);
    }
  }
View Full Code Here


   */
  @Override
  public String getText(Object object) {
    String label = super.getText(object);
    if (label == null || label.length() == 0) {
      JavaElement javaElement = ((JavaRequirement)object).getJavaElement();
      label = String.valueOf(javaElement);
    }
    return label;
  }
View Full Code Here

      }
      String pointsText = ExerciseView.refreshPoints((ExercisePart)obj, "{0} of {1}", null);
      text = partText + " - " + pointsText;
    } else if (obj instanceof JavaRequirement) {
      JavaRequirement req = (JavaRequirement)obj;
      JavaElement javaElement = req.getJavaElement();
      if (text == null) {
        text = javaElement.toString();
      }
    }
    return (text != null ? text : "");
  }
View Full Code Here

        partText = text + ": " + text;
      }
      text = partText;
    } else if (obj instanceof JavaRequirement) {
      JavaRequirement req = (JavaRequirement)obj;
      JavaElement javaElement = req.getJavaElement();
      if (text == null) {
        text = javaElement.toString();
      }
      // MessageFormat.format(req.getWhat(), new Object[]{<java_element>.getName()});
    }
    if (obj instanceof AbstractRequirement) {
      text += "<p>";
View Full Code Here

    while (it.hasNext()) {
      Object o = it.next();
      if (o instanceof JavaClass) {
        it.prune();
        if (testLogic == null || (testLogic.booleanValue() == (o instanceof TestRunnable))) {
          JavaElement element = (JavaElement)o;
          IJavaElement javaElement = JdtHelper.getJdtElement(element);
          addFile(javaElement);
        }
      }
    }
View Full Code Here

      }
      String pointsText = "<points>"; // ExerciseView.refreshPoints((ExercisePart)obj, "{0} of {1}", null);
      text = partText + " - " + pointsText;
    } else if (obj instanceof JavaRequirement) {
      JavaRequirement req = (JavaRequirement)obj;
      JavaElement javaElement = req.getJavaElement();
      if (text == null) {
        text = javaElement.toString();
      }
    }
    return (text != null ? text : "");
  }
View Full Code Here

    }
    return null;
  }

  protected JavaElement ensureJavaElement(String name, Collection javaElements, EClass eClass) {
    JavaElement javaElement = findJavaElement(name, javaElements, eClass);
    if (javaElement == null) {
      javaElement = (JavaElement) JexFactory.eINSTANCE.create(eClass);
      EStructuralFeature nameFeature = eClass.getEStructuralFeature("name");
      if (nameFeature != null) {
        javaElement.eSet(nameFeature, name);
      }
      javaElements.add(javaElement);
    }
    return javaElement;
  }
View Full Code Here

    }
    return null;
  }

  protected Boolean javaRequirementSatisfied(JavaRequirement javaRequirement, boolean requireModifiers, boolean requireTypes) {
    JavaElement jexElement = javaRequirement.getJavaElement();
//    if (jexElement instanceof TestRunnable) {
//      Boolean result = Boolean.TRUE;
//      for (JavaElement testedElement : ((TestRunnable) jexElement).getTestedElements()) {
//        if (testedElement instanceof Member) {
//          result = satisfiedAnd(result, validateJexMember((Member) testedElement, requireModifiers, requireTypes));
View Full Code Here

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setJavaElement(JavaElement newJavaElement) {
    JavaElement oldJavaElement = javaElement;
    javaElement = newJavaElement;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, JexPackage.JAVA_REQUIREMENT__JAVA_ELEMENT, oldJavaElement, javaElement));
  }
View Full Code Here

    result.append(')');
    return result.toString();
  }

  protected String getDefaultURIFragment() {
    JavaElement javaElement = getJavaElement();
    if (javaElement instanceof Member) {
      return "#" + ((Member)javaElement).getFullName();
    }
    return null;
  }
View Full Code Here

TOP

Related Classes of no.hal.jex.JavaElement

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.