Package org.rstudio.core.client

Examples of org.rstudio.core.client.CodeNavigationTarget


            new SelectionCommitHandler<CodeNavigationTarget>() {
         @Override
         public void onSelectionCommit(
                     SelectionCommitEvent<CodeNavigationTarget> event)
         {
            CodeNavigationTarget target = event.getSelectedItem();
            FileSystemItem fsi = FileSystemItem.createFile(target.getFile());
            fileTypeRegistry_.editFile(fsi, target.getPosition());
         }
      });

      view_.stopButton().addClickHandler(new ClickHandler() {
         @Override
View Full Code Here


         @Override
         public void onSelectionCommit(
                              SelectionCommitEvent<CodeNavigationTarget> event)
         {
            CodeNavigationTarget target = event.getSelectedItem();
            FileSystemItem fsi = FileSystemItem.createFile(target.getFile());
            fileTypeRegistry_.editFile(fsi, target.getPosition());
         }
      });
   }
View Full Code Here

   public CodeNavigationTarget getOutputForRow(TableRowElement row)
   {
      String file = row.getAttribute(DATA_FILE);
      int line = Integer.parseInt(row.getAttribute(DATA_LINE));

      return new CodeNavigationTarget(file, FilePosition.create(line, 1));
   }
View Full Code Here

         @Override
         public void onSelectionCommit(
                              SelectionCommitEvent<CodeNavigationTarget> event)
         {
            CodeNavigationTarget target = event.getSelectedItem();
            FileSystemItem fsi = FileSystemItem.createFile(target.getFile());
            fileTypeRegistry_.editFile(fsi, target.getPosition());
         }
      });
   }
View Full Code Here

         @Override
         public void onSelectionCommit(
                              SelectionCommitEvent<CodeNavigationTarget> event)
         {
            CodeNavigationTarget target = event.getSelectedItem();
            FileSystemItem fsi = FileSystemItem.createFile(target.getFile());
            RStudioGinjector.INSTANCE.getFileTypeRegistry()
               .editFile(fsi, target.getPosition());
         }
      });
      globalDisplay_ = globalDisplay;
   }
View Full Code Here

      view_.addSelectionCommitHandler(new SelectionCommitHandler<CodeNavigationTarget>()
      {
         @Override
         public void onSelectionCommit(SelectionCommitEvent<CodeNavigationTarget> event)
         {
            CodeNavigationTarget target = event.getSelectedItem();
            if (target == null)
               return;

            ftr.editFile(FileSystemItem.createFile(target.getFile()),
                         target.getPosition());
         }
      });

      view_.getStopSearchButton().addClickHandler(new ClickHandler()
      {
View Full Code Here

         line = 1;
      int column = Integer.parseInt(row.getAttribute(DATA_COLUMN));
      if (column < 0) // If we couldn't figure out the column
         column = 1;
     
      return new CodeNavigationTarget(path,
                                      FilePosition.create(line, column));
   }
View Full Code Here

   {
      String path = row.getAttribute(LOG_PATH);
      int line = Integer.parseInt(row.getAttribute(LOG_LINE));
      if (line < 0) // If we couldn't figure out the line
         line = 1;
      return new CodeNavigationTarget(path,
                                      FilePosition.create(line, 1));
   }
View Full Code Here

         @Override
         public void onSelection(SelectionEvent<Suggestion> event)
         {
            // map back to a code search result
            CodeNavigationTarget target =
               display_.getSearchOracle().navigationTargetFromSuggestion(
                                                event.getSelectedItem());
             
            // create full file path and position
            String srcFile = target.getFile();
            final FileSystemItem srcItem = FileSystemItem.createFile(srcFile);
            final FilePosition pos = target.getPosition()
           
            // fire editing event (delayed so the Enter keystroke
            // doesn't get routed into the source editor)
            Scheduler.get().scheduleDeferred(new ScheduledCommand() {
               @Override
View Full Code Here

class CodeSearchSuggestion implements Suggestion
{
   public CodeSearchSuggestion(FileItem fileItem)
   {
      isFileTarget_ = true;
      navigationTarget_ = new CodeNavigationTarget(fileItem.getPath());
      matchedString_ = fileItem.getFilename();
           
      // compute display string
      ImageResource image =
         fileTypeRegistry_.getIconForFilename(fileItem.getFilename());
View Full Code Here

TOP

Related Classes of org.rstudio.core.client.CodeNavigationTarget

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.