Examples of SourceRefElement


Examples of org.aspectj.org.eclipse.jdt.internal.core.SourceRefElement

      public void acceptAST(ICompilationUnit source, CompilationUnit ast) {
        // TODO (jerome) optimize to visit the AST only once
        IntArrayList intList = (IntArrayList) sourceElementPositions.get(source);
        for (int i = 0; i < intList.length; i++) {
          final int index = intList.list[i];
          SourceRefElement element = (SourceRefElement) elements[index];
          DOMFinder finder = new DOMFinder(ast, element, true/*resolve binding*/);
          try {
            finder.search();
          } catch (JavaModelException e) {
            throw new IllegalArgumentException(element + " does not exist"); //$NON-NLS-1$
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.core.SourceRefElement

      public void acceptAST(ICompilationUnit source, CompilationUnit ast) {
        // TODO (jerome) optimize to visit the AST only once
        IntArrayList intList = (IntArrayList) sourceElementPositions.get(source);
        for (int i = 0; i < intList.length; i++) {
          final int index = intList.list[i];
          SourceRefElement element = (SourceRefElement) elements[index];
          DOMFinder finder = new DOMFinder(ast, element, true/*resolve binding*/);
          try {
            finder.search();
          } catch (JavaModelException e) {
            throw new IllegalArgumentException(element + " does not exist"); //$NON-NLS-1$
View Full Code Here

Examples of org.eclipse.dltk.internal.core.SourceRefElement

  private static class SourceFieldComparator implements
      Comparator<IModelElement> {
    public int compare(IModelElement o1, IModelElement o2) {
      try {
        SourceRefElement e1 = (SourceRefElement) o1;
        SourceRefElement e2 = (SourceRefElement) o2;
        IType type1 = (IType) e1.getAncestor(IModelElement.TYPE);
        IType type2 = (IType) e2.getAncestor(IModelElement.TYPE);
        if (type1 != null && type2 != null && type1 != type2) {
          return -1;
        }
        if (e1.getSourceModule() == e2.getSourceModule()) {
          ISourceRange r1 = e1.getSourceRange();
          ISourceRange r2 = e2.getSourceRange();
          return (int) Math.signum(r1.getOffset() - r2.getOffset());
        } else {
          return -1;
        }
      } catch (ModelException e) {
View Full Code Here

Examples of org.eclipse.dltk.internal.core.SourceRefElement

                  .getFlags())) {
            result = (IType) modelElement;
          }

          if (modelElement instanceof SourceRefElement) {
            SourceRefElement child = (SourceRefElement) modelElement;
            ISourceRange range = child.getSourceRange();
            int start = range.getOffset();
            int end = start + range.getLength();
            if (start <= offset && offset <= end) {
              return result;
            }
View Full Code Here

Examples of org.eclipse.dltk.internal.core.SourceRefElement

                .getNodeByClass(moduleDeclaration,
                    declaringType);

            if (typeDeclaration != null
                && field instanceof SourceRefElement) {
              SourceRefElement sourceRefElement = (SourceRefElement) field;
              ISourceRange sourceRange = sourceRefElement
                  .getSourceRange();

              ClassDeclarationSearcher searcher = new ClassDeclarationSearcher(
                  sourceModule, typeDeclaration,
                  sourceRange.getOffset(),
View Full Code Here

Examples of org.eclipse.jdt.internal.core.SourceRefElement

      public void acceptAST(ICompilationUnit source, CompilationUnit ast) {
        // TODO (jerome) optimize to visit the AST only once
        IntArrayList intList = (IntArrayList) sourceElementPositions.get(source);
        for (int i = 0; i < intList.length; i++) {
          final int index = intList.list[i];
          SourceRefElement element = (SourceRefElement) elements[index];
          DOMFinder finder = new DOMFinder(ast, element, true/*resolve binding*/);
          try {
            finder.search();
          } catch (JavaModelException e) {
            throw new IllegalArgumentException(element + " does not exist"); //$NON-NLS-1$
View Full Code Here

Examples of org.eclipse.jdt.internal.core.SourceRefElement

      public void acceptAST(ICompilationUnit source, CompilationUnit ast) {
        // TODO (jerome) optimize to visit the AST only once
        IntArrayList intList = (IntArrayList) sourceElementPositions.get(source);
        for (int i = 0; i < intList.length; i++) {
          final int index = intList.list[i];
          SourceRefElement element = (SourceRefElement) elements[index];
          DOMFinder finder = new DOMFinder(ast, element, true/*resolve binding*/);
          try {
            finder.search();
          } catch (JavaModelException e) {
            throw new IllegalArgumentException(element + " does not exist"); //$NON-NLS-1$
View Full Code Here

Examples of org.eclipse.jdt.internal.core.SourceRefElement

      public void acceptAST(ICompilationUnit source, CompilationUnit ast) {
        // TODO (jerome) optimize to visit the AST only once
        IntArrayList intList = (IntArrayList) sourceElementPositions.get(source);
        for (int i = 0; i < intList.length; i++) {
          final int index = intList.list[i];
          SourceRefElement element = (SourceRefElement) elements[index];
          DOMFinder finder = new DOMFinder(ast, element, true/*resolve binding*/);
          try {
            finder.search();
          } catch (JavaModelException e) {
            throw new IllegalArgumentException(element + " does not exist"); //$NON-NLS-1$
View Full Code Here

Examples of org.eclipse.jdt.internal.core.SourceRefElement

      public void acceptAST(ICompilationUnit source, CompilationUnit ast) {
        // TODO (jerome) optimize to visit the AST only once
        IntArrayList intList = (IntArrayList) sourceElementPositions.get(source);
        for (int i = 0; i < intList.length; i++) {
          final int index = intList.list[i];
          SourceRefElement element = (SourceRefElement) elements[index];
          DOMFinder finder = new DOMFinder(ast, element, true/*resolve binding*/);
          try {
            finder.search();
          } catch (JavaModelException e) {
            throw new IllegalArgumentException(element + " does not exist"); //$NON-NLS-1$
View Full Code Here

Examples of org.eclipse.jdt.internal.core.SourceRefElement

      public void acceptAST(ICompilationUnit source, CompilationUnit ast) {
        // TODO (jerome) optimize to visit the AST only once
        IntArrayList intList = (IntArrayList) sourceElementPositions.get(source);
        for (int i = 0; i < intList.length; i++) {
          final int index = intList.list[i];
          SourceRefElement element = (SourceRefElement) elements[index];
          DOMFinder finder = new DOMFinder(ast, element, true/*resolve binding*/);
          try {
            finder.search();
          } catch (JavaModelException e) {
            throw new IllegalArgumentException(element + " does not exist"); //$NON-NLS-1$
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.