Package org.eclipse.dltk.core

Examples of org.eclipse.dltk.core.SourceRange


 
  public static ISourceRange createFrom(ASTNode node)
  {
    Assert.isNotNull(node);
   
    return new SourceRange(node.getStart(), node.getLength());
  }
View Full Code Here


    fGenerateDoc = true;
    fReturnMultipleVariables = false;
    fMethodName = "extracted"; //$NON-NLS-1$
    fSelectionStart = selectionStart;
    fSelectionLength = selectionLength;
    fSelectedSourceRange = new SourceRange(selectionStart, selectionLength);
    fReplaceDuplicates = false;
    fAddTypeHint = true;
  }
View Full Code Here

    } catch(Exception e) {
      throw new RefactoringStatusException(RefactoringMessages.ExtractMethodInputPage_errorCouldNotRetrieveCoveringMethodDeclaration);
    }
   
    // compute source ranges before and after the selected code
    fPreSelectedSourceRange = new SourceRange(fSelectedMethodSourceRange.getOffset(), fSelectionStart - fSelectedMethodSourceRange.getOffset());
    fPostSelectedSourceRange = new SourceRange(fSelectionStart + fSelectionLength, fSelectedMethodSourceRange.getOffset() + fSelectedMethodSourceRange.getLength() - fSelectionStart + fSelectionLength);
   
    // find all variables used in the selected method
    LocalVariableFinder finder = new LocalVariableFinder();
    finder.setRange(fSelectedMethodSourceRange);
    fProgram.accept(finder);
View Full Code Here

    public IndexField(ModelElement parent, String name, int flags,
        int offset, int length, int nameOffset, int nameLength,
        String doc) {
      super(parent, name);
      this.flags = flags;
      this.sourceRange = new SourceRange(offset, length);
      this.nameRange = new SourceRange(nameOffset, nameLength);
      this.doc = doc;
    }
View Full Code Here

        int offset, int length, int nameOffset, int nameLength,
        String[] parameterNames, String doc) {

      super(parent, name);
      this.flags = flags;
      this.sourceRange = new SourceRange(offset, length);
      this.nameRange = new SourceRange(nameOffset, nameLength);
      // MethodParameterInfo
      this.parameters = new IParameter[0];
      if (parameterNames != null) {
        this.parameters = new IParameter[parameterNames.length];
        for (int i = 0; i < parameterNames.length; i++) {
View Full Code Here

    public IndexType(ModelElement parent, String name, int flags,
        int offset, int length, int nameOffset, int nameLength,
        String[] superClassNames, String doc) {
      super(parent, name);
      this.flags = flags;
      this.sourceRange = new SourceRange(offset, length);
      this.nameRange = new SourceRange(nameOffset, nameLength);
      this.superClassNames = superClassNames;
      this.doc = doc;
    }
View Full Code Here

    public ControllerType(ModelElement parent, String name, int flags,
        int offset, int length, int nameOffset, int nameLength,
        String[] superClassNames, String doc) {
      super(parent, name);
      this.flags = flags;
      this.sourceRange = new SourceRange(offset, length);
      new SourceRange(nameOffset, nameLength);
      this.superClassNames = superClassNames;
      this.doc = doc;
    }
View Full Code Here

TOP

Related Classes of org.eclipse.dltk.core.SourceRange

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.