Package org.rstudio.studio.client.workbench.views.environment.model

Examples of org.rstudio.studio.client.workbench.views.environment.model.CallFrame


      boolean allInternal = true;
      int idxSourceEquiv = Integer.MAX_VALUE;

      for (int idx = 0; idx < frameList.length(); idx++)
      {
         CallFrame frame = frameList.get(idx);
         if (frame.isNavigable()) {
            allInternal = false;
         }
         if (frame.isSourceEquiv())
            idxSourceEquiv = idx;
      }
     
      for (int idx = frameList.length() - 1; idx >= 0; idx--)
      {
         CallFrame frame = frameList.get(idx);
         // Always show the first frame, since that's where execution is
         // actually halted. From the remaining frames, show them if they are
         // "navigable" (user) frames, or if the user has elected to show all
         // frames.
         CallFrameItem item = new CallFrameItem(
               frame,
               observer_,
               frame.isHidden() ||
                  (!panelHost_.getShowInternalFunctions() &&
                     ((!frame.isNavigable()) || idx > idxSourceEquiv) &&
                     !allInternal &&
                     idx > 0));
         if (contextDepth == frame.getContextDepth())
         {
            item.setActive();
         }
         callFrameItems_.add(item);
      }
View Full Code Here


      if (callFrames != null &&
          callFrames.length() > 0 &&
          contextDepth > 0)
      {
         view_.setCallFrames(callFrames, enteringDebugMode);
         CallFrame browseFrame = callFrames.get(
                 contextDepth_ - 1);
         String newBrowseFile = browseFrame.getAliasedFileName().trim();
         boolean sourceChanged = false;
        
         // check to see if the file we're about to switch to contains unsaved
         // changes. if it does, use the source supplied by the server, even if
         // the server thinks the document is clean.
         if (fileContainsUnsavedChanges(newBrowseFile))
         {
            useBrowseSources = true;
         }
        
         // if the file is different or we're swapping into or out of the source
         // viewer, turn off highlighting in the old file before turning it on
         // in the new one. avoid this in the case where the file is different
         // but both frames are viewed from source, since in this case an
         // unnecessary close and reopen of the source viewer would be
         // triggered.
         if ((!newBrowseFile.equals(currentBrowseFile_) ||
                  useBrowseSources != useCurrentBrowseSource_) &&
             !(useBrowseSources && useCurrentBrowseSource_))
         {
            openOrUpdateFileBrowsePoint(false, false);
         }

         useCurrentBrowseSource_ = useBrowseSources;
         if (!currentBrowseSource_.equals(functionCode))
         {
            currentBrowseSource_ = functionCode;
            sourceChanged = true;
         }
        
         // highlight the active line in the file now being debugged
         currentBrowseFile_ = newBrowseFile;
         currentBrowsePosition_ = browseFrame.getRange();
         currentFunctionLineNumber_ = browseFrame.getFunctionLineNumber();
         openOrUpdateFileBrowsePoint(true, sourceChanged);
      }  
      else
      {
         openOrUpdateFileBrowsePoint(false, false);
View Full Code Here

      JsArray<CallFrame> frames = event.getCallFrames();
      Set<FileFunction> activeFunctions = new TreeSet<FileFunction>();
      boolean hasSourceEquiv = false;
      for (int idx = 0; idx < frames.length(); idx++)
      {
         CallFrame frame = frames.get(idx);
         String functionName = frame.getFunctionName();
         String fileName = frame.getFileName();
         if (functionName.equals(".doTrace") &&
             event.isServerInitiated())
         {
            events_.fireEvent(new SendToConsoleEvent(
                  DebugCommander.NEXT_COMMAND, true));
         }
         activeFunctions.add(
               new FileFunction(functionName, fileName, "", false));
         if (frame.isSourceEquiv())
         {
            activeSource_ = fileName;
            hasSourceEquiv = true;
         }
      }
View Full Code Here

TOP

Related Classes of org.rstudio.studio.client.workbench.views.environment.model.CallFrame

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.