Examples of ITypeRoot


Examples of org.aspectj.org.eclipse.jdt.core.ITypeRoot

   */
  public static ImportRewrite create(CompilationUnit astRoot, boolean restoreExistingImports) {
    if (astRoot == null) {
      throw new IllegalArgumentException("AST must not be null"); //$NON-NLS-1$
    }
    ITypeRoot typeRoot = astRoot.getTypeRoot();
    if (!(typeRoot instanceof ICompilationUnit)) {
      throw new IllegalArgumentException("AST must have been constructed from a Java element"); //$NON-NLS-1$
    }
    List existingImport= null;
    if (restoreExistingImports) {
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.core.ITypeRoot

    ASTNode root= rootNode.getRoot();
    if (!(root instanceof CompilationUnit)) {
      throw new IllegalArgumentException("This API can only be used if the AST is created from a compilation unit or class file"); //$NON-NLS-1$
    }
    CompilationUnit astRoot= (CompilationUnit) root;
    ITypeRoot typeRoot = astRoot.getTypeRoot();
    if (typeRoot == null || typeRoot.getBuffer() == null) {
      throw new IllegalArgumentException("This API can only be used if the AST is created from a compilation unit or class file"); //$NON-NLS-1$
    }
   
    char[] content= typeRoot.getBuffer().getCharacters();
    LineInformation lineInfo= LineInformation.create(astRoot);
    String lineDelim= typeRoot.findRecommendedLineSeparator();
    Map options= typeRoot.getJavaProject().getOptions(true);
   
    return internalRewriteAST(content, lineInfo, lineDelim, astRoot.getCommentList(), options, rootNode);
  }
View Full Code Here

Examples of org.eclipse.jdt.core.ITypeRoot

        }
        return null;
    }

    public IResource getLaunchableResource(IEditorPart editorPart) {
        ITypeRoot element = JavaUI.getEditorInputTypeRoot(editorPart.getEditorInput());
        if (element != null) {
            try {
                return element.getCorrespondingResource();
            } catch (JavaModelException e) {}
        }
        return null;
    }
View Full Code Here

Examples of org.eclipse.jdt.core.ITypeRoot

    if (region == null || !(textEditor instanceof JavaEditor))
    {
      return null;
    }

    ITypeRoot input = EditorUtility.getEditorInputJavaElement(textEditor, false);
    if (input == null)
    {
      return null;
    }
View Full Code Here

Examples of org.eclipse.jdt.core.ITypeRoot

        }
        return null;
    }

    public IResource getLaunchableResource(IEditorPart editorPart) {
        ITypeRoot element = JavaUI.getEditorInputTypeRoot(editorPart.getEditorInput());
        if (element != null) {
            try {
                return element.getCorrespondingResource();
            } catch (JavaModelException e) {}
        }
        return null;
    }
View Full Code Here

Examples of org.eclipse.jdt.core.ITypeRoot

                        if (project.isInBundleClasspath(root))
                        {
                            for (IJavaElement e1 : JavaHelper.findTypes(root,
                                IJavaElement.COMPILATION_UNIT, IJavaElement.CLASS_FILE))
                            {
                                ITypeRoot typeRoot = (ITypeRoot) e1;
                                IType type = (IType) JavaHelper.findType(typeRoot,
                                    IJavaElement.TYPE);
                                if (JavaHelper.isAssignableTo(ifaceOrParentClass, type))
                                {
                                    dialog.addElement(type.getFullyQualifiedName());
View Full Code Here

Examples of org.eclipse.jdt.core.ITypeRoot

      }
      IJavaElement input= EditorUtility.getEditorInputJavaElement(fPart, false);
      if (!(input instanceof ITypeRoot)) {
        return;
      }
      final ITypeRoot typeRoot= (ITypeRoot) input;
     
     
      fCurrentJob= new Job(JavaUIMessages.SelectionListenerWithASTManager_job_title)
      {
        public IStatus run(IProgressMonitor monitor)
View Full Code Here

Examples of org.eclipse.jdt.core.ITypeRoot

    /* (non-Javadoc)
     * @see org.eclipse.debug.ui.ILaunchShortcut#launch(org.eclipse.ui.IEditorPart, java.lang.String)
     */
    public void launch(IEditorPart editor, String mode)
    {
        ITypeRoot element = JavaUI.getEditorInputTypeRoot(editor.getEditorInput());
        if (element != null)
        {
            IMethod selectedMethod = resolveSelectedMethodName(editor, element);
            if (selectedMethod != null)
            {
View Full Code Here

Examples of org.eclipse.jdt.core.ITypeRoot

     *
     * @since 3.4
     */
    public ILaunchConfiguration[] getLaunchConfigurations(final IEditorPart editor)
    {
        final ITypeRoot element = JavaUI.getEditorInputTypeRoot(editor.getEditorInput());
        if (element != null)
        {
            IMethod selectedMethod = null;
            if (Display.getCurrent() == null)
            {
View Full Code Here

Examples of org.eclipse.jdt.core.ITypeRoot

     *
     * @since 3.4
     */
    public IResource getLaunchableResource(IEditorPart editor)
    {
        ITypeRoot element = JavaUI.getEditorInputTypeRoot(editor.getEditorInput());
        if (element != null)
        {
            try
            {
                return element.getCorrespondingResource();
            }
            catch (JavaModelException e)
            {
            }
        }
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.