Examples of findPrimaryType()


Examples of org.eclipse.jdt.core.ICompilationUnit.findPrimaryType()

          aspect = typeInCU;
        }
      } else {
        ICompilationUnit cu = (ICompilationUnit) elem.getAncestor(IJavaElement.COMPILATION_UNIT);
        if (cu != null) {
          aspect = cu.findPrimaryType();
        }
      }
      if (aspect != null) {
        fAspectNameDialogField.setText(aspect.getElementName());
      }
View Full Code Here

Examples of org.eclipse.jdt.core.ICompilationUnit.findPrimaryType()

      if (resource.exists()) {
        status.setWarning("Aspect already exits. Only the crosscut will be created.");
        // TODO Check if aspect is a subclass of
        // ch.ethz.prose.DefaultAspect.
      }
      fAspect = cu.findPrimaryType();
    }

    return status;
  }
View Full Code Here

Examples of org.eclipse.jdt.core.ICompilationUnit.findPrimaryType()

                       exception on classFile.isInterface() call.
                    }*/
                    break;
                case IJavaElement.COMPILATION_UNIT :
                    ICompilationUnit cUnit = (ICompilationUnit) javaEl;
                    IType type = cUnit.findPrimaryType();
                    abstractOrInterface = type != null && type.isInterface();
                    break;
                case IJavaElement.TYPE :
                    abstractOrInterface = ((IType) javaEl).isInterface();
                    break;
View Full Code Here

Examples of org.eclipse.jdt.core.ICompilationUnit.findPrimaryType()

                    enclosingType = typeInCU;
                }
            } else {
                ICompilationUnit cu = (ICompilationUnit) elem.getAncestor(IJavaElement.COMPILATION_UNIT);
                if (cu != null) {
                    enclosingType = cu.findPrimaryType();
                }
            }

            try {
                IType type = null;
View Full Code Here

Examples of org.eclipse.jdt.core.ICompilationUnit.findPrimaryType()

                    enclosingType = typeInCU;
                }
            } else {
                ICompilationUnit cu = (ICompilationUnit) elem.getAncestor(IJavaElement.COMPILATION_UNIT);
                if (cu != null) {
                    enclosingType = cu.findPrimaryType();
                }
            }

            try {
                IType type = null;
View Full Code Here

Examples of org.eclipse.jdt.core.ICompilationUnit.findPrimaryType()

          IType classUnderTestType = (IType) element.getAncestor(IJavaElement.TYPE);
          if (classUnderTestType == null) {
            ICompilationUnit compilationUnit =
                (ICompilationUnit) element.getAncestor(IJavaElement.COMPILATION_UNIT);
            if (compilationUnit != null) {
              classUnderTestType = compilationUnit.findPrimaryType();
            }
          }
          if (classUnderTestType == null) {
            setErrorState();
          } else {
View Full Code Here

Examples of org.eclipse.jdt.core.ICompilationUnit.findPrimaryType()

        if (element instanceof IAdaptable) {
            ICompilationUnit compilationUnit =
                (ICompilationUnit)((IAdaptable)element).getAdapter(ICompilationUnit.class);

            if (compilationUnit != null) {
                IType type = compilationUnit.findPrimaryType();
                ILaunchConfiguration launchConfiguration = getExistingLaunchConfiguration(type);

                if (launchConfiguration == null) {
                    launchConfiguration = createLaunchConfiguration(type);
                }
View Full Code Here

Examples of org.eclipse.jdt.core.ICompilationUnit.findPrimaryType()

                    if (obj instanceof ICompilationUnit)
                    {
                        // *.java file
                        ICompilationUnit javaFile = (ICompilationUnit) obj;
                        ijp = javaFile.getJavaProject();
                        primaryType = javaFile.findPrimaryType();
                    }
                    else if (obj instanceof IClassFile)
                    {
                        // *.class file
                        IClassFile classFile = (IClassFile) obj;
View Full Code Here

Examples of org.eclipse.jdt.core.ICompilationUnit.findPrimaryType()

    }
    if (dialog.open() == Window.OK) {
      Object element = dialog.getFirstResult();
      if (element instanceof ICompilationUnit) {
        ICompilationUnit unit = (ICompilationUnit) element;
        factoryNameField.setText(unit.findPrimaryType().getFullyQualifiedName());
      }
    }
  }

  ////////////////////////////////////////////////////////////////////////////
View Full Code Here

Examples of org.eclipse.jdt.core.ICompilationUnit.findPrimaryType()

    IJavaElement clazz;
    try {
      clazz = javaProject.findElement(new Path(qName +".java"));
      if (clazz != null && clazz instanceof ICompilationUnit) {
        ICompilationUnit compUnit = (ICompilationUnit) clazz;
        IType type = compUnit.findPrimaryType();
        if (type != null) {
          String attrName = firstCharacterToLowerCase(attrClass.getClassName());
          String attrPackage = mappingHelper.getPackageOfImplementationArtifact(attrClass);
         
          IJavaElement sibling = null;
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.