Package org.cfeclipse.cfml.net

Examples of org.cfeclipse.cfml.net.RemoteFileEditorInput$WorkbenchAdapter


                object = rem.resolveFile(fcd.filename);
                if (object.getType().equals(FileType.IMAGINARY)) {
                  object.createFile();
                  fileViewer.refresh();
                  // Now open it
                  RemoteFileEditorInput input = new RemoteFileEditorInput(object);
                  IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
                      .getActivePage();
                  page.openEditor(input, CFMLEditor.ID);
                }
              }
            } catch (FileSystemException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
            } catch (PartInitException e) {
              // TODO Auto-generated catch block
              e.printStackTrace();
            }

          } else if (obj instanceof RemoteFile) {
            FileObject rem = ((RemoteFile) obj).getFileItem();

            FileObject object;
            try {
              object = rem.resolveFile(fcd.filename);
              if (object.getType().equals(FileType.IMAGINARY)) {
                object.createFile();
                fileViewer.refresh();
                // Now open it
                RemoteFileEditorInput input = new RemoteFileEditorInput(object);
                IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
                    .getActivePage();
                page.openEditor(input, CFMLEditor.ID);
              }
            } catch (FileSystemException e) {
View Full Code Here


            }

            FileObject selFile = FTPConnection.manager.resolveFile(filename);
           // FTPFile[] files = ftpClient.dirDetails(filename);
            RemoteFile remoteFile = new RemoteFile(selFile, filename);
               RemoteFileEditorInput input = new RemoteFileEditorInput(remoteFile);
            return input;
        } catch (Exception e) {
            AlertUtils.alertUser(e);
            return null;
        }
View Full Code Here

            AlertUtils.alertUser(e);
            return null;
        }
    }
    public IEditorInput getEditorInput(RemoteFile remFile) {
       RemoteFileEditorInput input = new RemoteFileEditorInput(remFile);
     
      return input;
  }
View Full Code Here

     
      String fileName = "";
      if (element[0] instanceof RemoteFile) {
      RemoteFile remFile = (RemoteFile) element[0];
      fileName = remFile.getName();
      input = new RemoteFileEditorInput(remFile);
    }
     
     
        IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
     
View Full Code Here

      setDocumentContent(document, contentStream, encoding);
    }
   
    if(editorInput instanceof RemoteFileEditorInput)
    {
      RemoteFileEditorInput input = (RemoteFileEditorInput) editorInput;
      InputStream inputStream;
      try {
        inputStream = input.getFileObject().getContent().getInputStream();
        setDocumentContent(document, inputStream, encoding);
      } catch (FileSystemException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
     
     
    }
    if(editorInput instanceof FileStoreEditorInput)
    {
      FileStoreEditorInput input = (FileStoreEditorInput) editorInput;
      FileInputStream contentStream = null;
     
      try
      {
        contentStream = new FileInputStream(input.getURI().getPath());
      }
      catch (FileNotFoundException e)
      {
        e.printStackTrace();
      }
View Full Code Here

          return input.getPath(input).toFile().canWrite();
    }
   
    if(element instanceof RemoteFileEditorInput)
    {
        RemoteFileEditorInput input = (RemoteFileEditorInput)element;   
        return input.canWrite();
    }
   
    return super.isModifiable(element);
  }
View Full Code Here

          return !input.getPath(input).toFile().canWrite();
      }
     
      if(element instanceof RemoteFileEditorInput)
      {
          RemoteFileEditorInput input = (RemoteFileEditorInput)element;
          return !input.canWrite();
      }

      if(element instanceof FileStoreEditorInput)
      {
        FileStoreEditorInput input = (FileStoreEditorInput)element;
        File file = new File(input.getURI().getPath());
          return !file.canWrite();
      }
     
      return super.isReadOnly(element);
  }
View Full Code Here

        debug(e); // "FileViewer.doDefaultFileAction " +
      }
    }
    else {
      //final String fileName = file.getAbsolutePath();
      RemoteFileEditorInput input = new RemoteFileEditorInput(file);
      try {
        IEditorDescriptor desc = PlatformUI.getWorkbench().getEditorRegistry().getDefaultEditor(file.getName().getBaseName());       
        IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow()
          .getActivePage();
        //page.openEditor(input, desc.getId());
View Full Code Here

TOP

Related Classes of org.cfeclipse.cfml.net.RemoteFileEditorInput$WorkbenchAdapter

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.