Package org.eclipse.dltk.internal.core

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


                  .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

                .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

TOP

Related Classes of org.eclipse.dltk.internal.core.SourceRefElement

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.