Examples of FileSystemItem


Examples of org.rstudio.core.client.files.FileSystemItem

      view_.showLogButton().addClickHandler(new ClickHandler() {

         @Override
         public void onClick(ClickEvent event)
         {
            FileSystemItem logFile = FileSystemItem.createFile(
                        targetFile_.getParentPath().completePath(
                                            targetFile_.getStem() + ".log"));
            fileTypeRegistry_.editFile(logFile);
         }
        
      });
     
      view_.errorList().addSelectionCommitHandler(
                              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 Full Code Here

Examples of org.rstudio.core.client.files.FileSystemItem

         @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

Examples of org.rstudio.core.client.files.FileSystemItem

      return new ArrayList<FileSystemItem>(selectedSet);
   }
  
   public void updateWithAction(FileChange viewAction)
   {       
      final FileSystemItem file = viewAction.getFile();
      final List<FileSystemItem> files = getFiles();
      switch(viewAction.getType())
      {
      case FileChange.ADD:
         if (file.getParentPath().equalTo(containingPath_))
         {
            int row = rowForFile(file);
            if (row == -1)
            {
               files.add(file);
View Full Code Here

Examples of org.rstudio.core.client.files.FileSystemItem

      // is in sync with the actual copy of the function, navigate to the
      // file itself
      if (currentBrowsePosition_ != null &&
          !useCurrentBrowseSource_)
      {
         FileSystemItem sourceFile = FileSystemItem.createFile(file);
         eventBus_.fireEvent(new OpenSourceFileEvent(sourceFile,
                                (FilePosition) currentBrowsePosition_.cast(),
                                FileTypeRegistry.R,
                                debugging ?
                                      (contextDepth_ == 1 ?
View Full Code Here

Examples of org.rstudio.core.client.files.FileSystemItem

                                                     new ClickHandler() {
         @Override
         public void onClick(ClickEvent event)
         { 
            // get temp file for preview
            FileSystemItem tempDir =
                  FileSystemItem.createDir(sessionInfo.getTempDir());
            FileSystemItem previewPath =
                  FileSystemItem.createFile(tempDir.completePath("preview.pdf"));
               
            // invoke handler
            SavePlotAsHandler handler = createSavePlotAsHandler();
            handler.attemptSave(previewPath, true, true, null);   
View Full Code Here

Examples of org.rstudio.core.client.files.FileSystemItem

  
   private void attemptSavePdf(boolean overwrite,
                               final Operation onCompleted)
   {
      // validate file name
      FileSystemItem targetPath = getTargetPath();
      if (targetPath == null)
      {
         globalDisplay_.showErrorMessage(
            "File Name Required",
            "You must provide a file name for the plot pdf.",
View Full Code Here

Examples of org.rstudio.core.client.files.FileSystemItem

               }
               // must be a local package
               else
               {
                  // get path
                  FileSystemItem localPackage = request.getLocalPackage();
                 
                  // convert to string
                  String path = localPackage.getPath();
                 
                  // append command
                  command.append("\"" + path + "\", repos = NULL");
                 
                  // append type = source if needed
View Full Code Here

Examples of org.rstudio.core.client.files.FileSystemItem

               }}));
      releaseOnDismiss.add(prefs.useSpacesForTab().bind(
            new CommandWithArg<Boolean>() {
               public void execute(Boolean arg) {
                  // Makefile always uses tabs
                  FileSystemItem file = context.getActiveFile();
                  if ((file != null) &&
                     ("Makefile".equals(file.getName()) ||
                      "Makevars".equals(file.getName()) ||
                      "Makevars.win".equals(file.getName())))
                  {
                     docDisplay.setUseSoftTabs(false);
                  }
                  else
                  {
View Full Code Here

Examples of org.rstudio.core.client.files.FileSystemItem

      templateItem.addIcon(resources.templateIcon());
      listTemplates_.addItem(templateItem);
     
      // Save templates to the current project directory if available, and the
      // current working directory if not
      FileSystemItem dir = workbench.getActiveProjectDir();
      if (dir == null)
         dir = workbench.getCurrentWorkingDir();
      templateChooser_.setTargetDirectory(dir.getPath());

      updateOptions(getSelectedTemplate());
   }
View Full Code Here

Examples of org.rstudio.core.client.files.FileSystemItem

      else
      {
         String rootPref = prefs_.rootDocument().getValue();
         if (rootPref.length() > 0)
         {
            FileSystemItem projDir =
                           session_.getSessionInfo().getActiveProjectDir();
            if (projDir != null)
               return FileSystemItem.createFile(projDir.completePath(rootPref));
            else
               return editorFile;
         }
         else
         {
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.