Package org.rstudio.core.client.files

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


                                                     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

  
   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

               }
               // 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

               }}));
      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

      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

      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

      flowPanel_.add(spacerLabel);
   }
  
   protected String projFileFromDir(String dir)
   {
      FileSystemItem dirItem = FileSystemItem.createDir(dir);
      return FileSystemItem.createFile(
        dirItem.completePath(dirItem.getName() + ".Rproj")).getPath();
   }
View Full Code Here

         addClickHandler(new ClickHandler() {

            @Override
            public void onClick(ClickEvent event)
            {
               final FileSystemItem projDir = RStudioGinjector.INSTANCE.
                     getSession().getSessionInfo().getActiveProjectDir();
          
               RStudioGinjector.INSTANCE.getFileDialogs().chooseFolder(
                 "Choose Directory",
                 RStudioGinjector.INSTANCE.getRemoteFileSystemContext(),
View Full Code Here

         addClickHandler(new ClickHandler() {

            @Override
            public void onClick(ClickEvent event)
            {
               final FileSystemItem projDir = RStudioGinjector.INSTANCE.
                     getSession().getSessionInfo().getActiveProjectDir();
          
               RStudioGinjector.INSTANCE.getFileDialogs().openFile(
                 "Choose File",
                 RStudioGinjector.INSTANCE.getRemoteFileSystemContext(),
View Full Code Here

TOP

Related Classes of org.rstudio.core.client.files.FileSystemItem

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.