Examples of moveToPosition()


Examples of org.rstudio.studio.client.workbench.views.source.editors.text.ace.TokenCursor.moveToPosition()

        
         // Try to see if we can find a function name
         TokenCursor cursor = codeModel.getTokenCursor();
        
         // NOTE: This can fail if the document is empty
         if (!cursor.moveToPosition(cursorPosition))
            return;
        
         if (cursor.currentValue() == "(" || cursor.findOpeningBracket("(", false))
         {
            if (cursor.moveToPreviousToken())
View Full Code Here

Examples of org.rstudio.studio.client.workbench.views.source.editors.text.ace.TokenCursor.moveToPosition()

      if (editor != null)
      {
         CodeModel codeModel = editor.getSession().getMode().getCodeModel();
         TokenCursor cursor = codeModel.getTokenCursor();
        
         if (cursor.moveToPosition(input_.getCursorPosition()))
         {
            String token = "";
            if (cursor.currentType() == "identifier")
               token = cursor.currentValue();
           
View Full Code Here

Examples of org.rstudio.studio.client.workbench.views.source.editors.text.ace.TokenCursor.moveToPosition()

      CodeModel codeModel = editor.getSession().getMode().getCodeModel();
      codeModel.tokenizeUpToRow(input_.getCursorPosition().getRow());
     
      TokenCursor cursor = codeModel.getTokenCursor();
        
      if (!cursor.moveToPosition(input_.getCursorPosition()))
         return false;
     
      // Move back to the '$'
      while (cursor.currentValue() != "$" && cursor.currentValue() != "@")
         if (!cursor.moveToPreviousToken())
View Full Code Here

Examples of org.rstudio.studio.client.workbench.views.source.editors.text.ace.TokenCursor.moveToPosition()

      codeModel.tokenizeUpToRow(row + 100);
     
      // Make a token cursor and place it at the first token previous
      // to the cursor.
      TokenCursor tokenCursor = codeModel.getTokenCursor();
      if (!tokenCursor.moveToPosition(input_.getCursorPosition()))
         return context;
     
      TokenCursor startCursor = tokenCursor.cloneCursor();
      boolean startedOnEquals = tokenCursor.currentValue() == "=";
      if (startCursor.currentType() == "identifier")
View Full Code Here

Examples of org.rstudio.studio.client.workbench.views.source.editors.text.ace.TokenCursor.moveToPosition()

         boolean textFollowingCursorHasOpenParen = false;
         if (editor != null)
         {
            TokenCursor cursor =
                  editor.getSession().getMode().getCodeModel().getTokenCursor();
            cursor.moveToPosition(editor.getCursorPosition());
            if (cursor.moveToNextToken())
               textFollowingCursorHasOpenParen =
               cursor.currentValue() == "(";
         }
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.