Package org.rstudio.studio.client.workbench.views.console.shell.editor

Examples of org.rstudio.studio.client.workbench.views.console.shell.editor.InputEditorDisplay


      eventBus_.fireEvent(new ConsoleInputEvent(commandText));
   }

   public void onSendToConsole(final SendToConsoleEvent event)
   { 
      final InputEditorDisplay display = view_.getInputEditorDisplay();
     
      // get anything already at the console
      final String previousInput = StringUtil.notNull(display.getText());
     
      // define code block we execute at finish
      Command finishSendToConsole = new Command() {
         @Override
         public void execute()
         {
            if (event.shouldExecute())
            {
               processCommandEntry();
               if (previousInput.length() > 0)
                  display.setText(previousInput);
            }
           
            if (!event.shouldExecute() || event.shouldFocus())
            {
               display.setFocus(true);
               display.collapseSelection(false);
           
         }
      };
     
      // do standrd finish if we aren't animating
      if (!event.shouldAnimate())
      {
         display.clear();
         display.setText(event.getCode());
         finishSendToConsole.execute();
      }
      else
      {
         inputAnimator_.enque(event.getCode(), finishSendToConsole);
View Full Code Here


         int modifiers = KeyboardShortcut.getModifierValue(
                                                event.getNativeEvent());
        
         if (historyEnabled_ && event.isUpArrow() && modifiers == 0)
         {
            InputEditorDisplay input = display_.getInputEditorDisplay();
            if (input.getCurrentLineNum() == 0)
            {
               event.preventDefault();
               event.stopPropagation();

               navigateHistory(-1);
            }
         }
         else if (historyEnabled_ && event.isDownArrow() && modifiers == 0)
         {
            InputEditorDisplay input = display_.getInputEditorDisplay();
            if (input.getCurrentLineNum() == input.getCurrentLineCount() - 1)
            {
               event.preventDefault();
               event.stopPropagation();

               navigateHistory(1);
View Full Code Here

TOP

Related Classes of org.rstudio.studio.client.workbench.views.console.shell.editor.InputEditorDisplay

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.