Examples of SourcePosition


Examples of org.openquark.cal.compiler.SourcePosition

            saveButton.setEnabled(false);
        }
       
        private void selectTargetAtCurrentPosition(SourceRange sourceRange) {
            Document doc = editorPane.getDocument();
            SourcePosition startPosition = sourceRange.getStartSourcePosition();
            SourcePosition endPosition = sourceRange.getEndSourcePosition();
           
            try {
               
                int len = doc.getLength();
                String text = doc.getText(0, len);
                int startIndex = startPosition.getPosition(text);
                int endIndex = endPosition.getPosition(text, startPosition, startIndex);

                editorPane.select(startIndex, endIndex);
               
            } catch (BadLocationException e1) {
                e1.printStackTrace();
View Full Code Here

Examples of org.rstudio.studio.client.workbench.views.source.model.SourcePosition

         // if we got a hit
         if (def != null && def.getName() != null)
         {        
            // try to search for the function locally
            SourcePosition position = searchLocally_ ?
                  docDisplay_.findFunctionPositionFromCursor(def.getName()) :
                  null;
                 
            if (position != null)
            {
View Full Code Here

Examples of st.gravel.support.compiler.ast.SourcePosition

    this.method = method;
    this.mclass = mclass;
  }

  public String source() {
    SourcePosition sourcePosition = method.sourcePosition();
    if(sourcePosition == null)
      return method.prettySourceString();
    String contentsOfEntireFile = FilenameExtensions.contentsOfEntireFile(sourcePosition.sourceFile().asFile());
    return contentsOfEntireFile.substring(sourcePosition.start(), sourcePosition.stop());
  }
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.