Package no.hal.jex

Examples of no.hal.jex.JavaPack


  public final static String ALL_TESTS_TEST_SUITE_NAME = "AllTests";
 
  private void createChildrenFromJavaModel(JavaElement parent, IJavaElement javaElement, int depth) throws Exception {
    if (parent instanceof JavaPack && javaElement instanceof IPackageFragment) {
      JavaPack pack = (JavaPack)parent;
      List<IMember> classes = JdtHelper.findJavaMembers((IPackageFragment) javaElement, null, IJavaElement.TYPE, IType.class);
      createJexClasses(classes, depth, pack.getClasses());
      createNamedClass(pack.getName() + "." + ALL_TESTS_TEST_SUITE_NAME, JexPackage.eINSTANCE.getTestSuite(), null, depth, pack.getClasses());
    } else if (parent instanceof JavaClass && javaElement instanceof IType) {
      JavaClass javaClass = (JavaClass)parent;
      IType type = (IType)javaElement;
      List<IMember> fields = JdtHelper.findJavaMembers(type, null, IJavaElement.FIELD, IField.class);
      for (Iterator<IMember> it = fields.iterator(); it.hasNext();) {
View Full Code Here


              if (rootObject != null) {
                resource.getContents().add(rootObject);
              }
              Object[] selection = initialObjectCreationPage.packageField.getSelection();
              if (selection != null && selection.length > 0) {
                JavaPack pack = (JavaPack)JexPackage.eINSTANCE.getEFactoryInstance().create(JexPackage.eINSTANCE.getJavaPack());
                pack.setName(((IJavaElement)selection[0]).getElementName());
                ((AbstractRequirement)rootObject).getJavaElements().add(pack);
                Command createChildrenCommand = null;
                if (initialObjectCreationPage.immediateChildrenButton.getSelection()) {
                  createChildrenCommand = new CreateChildrenFromJavaModelCommand(pack, Flags.AccPublic, false);
                } else if (initialObjectCreationPage.recursiveChildrenButton.getSelection()) {
View Full Code Here

  protected JavaClass ensureJavaClass(String fullName, EClass eClass) {
    int pos = fullName.lastIndexOf('.');
    return (TestSuite) ensureJavaClass(fullName.substring(0, pos), fullName.substring(pos + 1), JexPackage.eINSTANCE.getTestSuite());
  }
  protected JavaClass ensureJavaClass(String packagePrefix, String elementName, EClass eClass) {
    JavaPack javaPack = ensureJavaPack(packagePrefix, exercise.getJavaElements());
    return (JavaClass) ensureJavaElement(elementName, javaPack.getClasses(), eClass);
  }
View Full Code Here

    return getSimpleName(getName());
  }
 
  public String getFullName() {
    JavaClass javaClass = (this instanceof JavaClass ? (JavaClass) this : getOwner());
    JavaPack pack = (javaClass != null ? javaClass.getPack() : null);
    String packageName = (pack != null ? pack.getName() : null);
    String className = (packageName != null && packageName.length() > 0 ? packageName + "." : "") + javaClass.getName();
    return (javaClass == null ? getName() : (javaClass == this ? className : className + "." + getName()));
  }
View Full Code Here

   * @NOT generated
   */
  public String toString() {
    if (eIsProxy()) return super.toString();

    JavaPack pack = getPack();
    String kind = "class";
    if (getClassKind() == ClassKind.INTERFACE_KIND) {
      kind = "interface";
    } else if (getClassKind() == ClassKind.ENUM_KIND) {
      kind = "enum";
View Full Code Here

TOP

Related Classes of no.hal.jex.JavaPack

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.