Package org.eclipse.core.runtime

Examples of org.eclipse.core.runtime.IPath.toFile()


        }
        else if ( element instanceof IPathEditorInput )
        {
            IPathEditorInput pei = ( IPathEditorInput ) element;
            IPath path = pei.getPath();
            file = path.toFile();
        }
        else if ( elementClassName.equals( "org.eclipse.ui.internal.editors.text.JavaFileEditorInput" ) //$NON-NLS-1$
            || elementClassName.equals( "org.eclipse.ui.ide.FileStoreEditorInput" ) ) //$NON-NLS-1$
        // The class 'org.eclipse.ui.internal.editors.text.JavaFileEditorInput'
        // is used when opening a file from the menu File > Open... in Eclipse 3.2.x
View Full Code Here


    {
        if ( input instanceof IPathEditorInput )
        {
            IPathEditorInput pei = ( IPathEditorInput ) input;
            IPath path = pei.getPath();
            File javaIoFile = path.toFile();
            long fileLength = javaIoFile.length();
            if ( fileLength > ( 1 * 1024 * 1024 ) )
            {
                MessageDialog.openError( site.getShell(), Messages.getString( "LdifEditor.LDIFFileIsTooBig" ), //$NON-NLS-1$
                    Messages.getString( "LdifEditor.LDIFFileIsTooBigDescription" ) ); //$NON-NLS-1$
View Full Code Here

       
        IPath path = new Path(filePath);
        path = path.append(".metadata");
        path = path.append(".log");
       
        final File file = path.toFile();
       
        fileWatcher = new FileWatcher(file);
       
        asyncExec(new Runnable() {
            public void run()
View Full Code Here

  }
 
  private void loadNotesText()
  {
    IPath   dataPath = getDataPath();
    File   file = dataPath.toFile();
   
    if (!file.exists() || !file.canRead())
      return;
   
    try
View Full Code Here

  {
    if (!isDirty())
      return;
   
    IPath   dataPath = getDataPath();
    File   file = dataPath.toFile();
   
    String   text = textViewer.getDocument().get();
   
    try
    {
View Full Code Here

        for (int i = 0; i < nodes.length; i++) {
            String contents = getResourceContents(nodes[i]);
            IPath path = new Path(Activator.getDefault().getStateLocation().toOSString() +
                                  File.separator + "t" + //$NON-NLS-1$
                                  String.valueOf(System.currentTimeMillis()));
            if (!path.toFile().mkdir()) {
                throw new Exception("Could not create directory " + path.toOSString()); //$NON-NLS-1$
            }
            path.toFile().deleteOnExit();
            File transfer = new File(path + File.separator + nodes[i].getName());
            transfer.deleteOnExit();
View Full Code Here

                                  File.separator + "t" + //$NON-NLS-1$
                                  String.valueOf(System.currentTimeMillis()));
            if (!path.toFile().mkdir()) {
                throw new Exception("Could not create directory " + path.toOSString()); //$NON-NLS-1$
            }
            path.toFile().deleteOnExit();
            File transfer = new File(path + File.separator + nodes[i].getName());
            transfer.deleteOnExit();
            FileOutputStream fos = new FileOutputStream(transfer);
            PrintWriter writer = new PrintWriter(fos);
            writer.write(contents);
View Full Code Here

            writer.close();
            res.add(transfer.getAbsolutePath());

            IPath metaPath = GuvnorMetadataUtils.
                                createGuvnorMetadataLocation(path.toOSString());
            metaPath.toFile().deleteOnExit();
            File metaFile = GuvnorMetadataUtils.
                                getGuvnorMetadataFile(metaPath.toOSString(), nodes[i].getName());
            metaFile.deleteOnExit();
            GuvnorMetadataUtils.writeGuvnorMetadataProps(metaFile, getGuvnorMetadataProps(nodes[i]));
            res.add(metaFile.getAbsolutePath());
View Full Code Here

        // TODO throw exception
        return;
      }
      IPath descriptorPath = RutaProjectUtils.getEngineDescriptorPath(scriptFile.getLocation(),
              project);
      String descriptorAbsolutePath = descriptorPath.toFile().getAbsolutePath();

      try {
        ILaunchManager mgr = DebugPlugin.getDefault().getLaunchManager();
        ILaunchConfigurationType type = mgr
                .getLaunchConfigurationType(RutaLaunchConfigurationConstants.ID_RUTA_SCRIPT);
View Full Code Here

        String elementClassName = element.getClass().getName();
        if ( element instanceof IPathEditorInput )
        {
            IPathEditorInput pei = ( IPathEditorInput ) element;
            IPath path = pei.getPath();
            file = path.toFile();
        }
        else if ( elementClassName.equals( "org.eclipse.ui.internal.editors.text.JavaFileEditorInput" ) //$NON-NLS-1$
            || elementClassName.equals( "org.eclipse.ui.ide.FileStoreEditorInput" ) ) //$NON-NLS-1$
        // The class 'org.eclipse.ui.internal.editors.text.JavaFileEditorInput'
        // is used when opening a file from the menu File > Open... in Eclipse 3.2.x
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.