Examples of IFileInfo


Examples of org.eclipse.cdt.managedbuilder.core.IFileInfo

  // }
  // end remove

  // Use the tool from the resource configuration if there is one
  if (rcInfo instanceof IFileInfo) {
      IFileInfo fi = (IFileInfo) rcInfo;
      ITool[] tools = fi.getToolsToInvoke();
      if (tools != null && tools.length > 0) {
    tool = tools[0];
    // if(!tool.getCustomBuildStep())
    addToBuildVar(buildVarToRuleStringMap, ext, varName, relativePath, sourceLocation, generatedSource);
      }
View Full Code Here

Examples of org.eclipse.cdt.managedbuilder.core.IFileInfo

  String inputExtension = sourceLocation.getFileExtension();
  String outputExtension = null;

  ITool tool = null;
  if (rcInfo instanceof IFileInfo) {
      IFileInfo fi = (IFileInfo) rcInfo;
      ITool[] tools = fi.getToolsToInvoke();
      if (tools != null && tools.length > 0) {
    tool = tools[0];
      }
  } else {
      IFolderInfo foInfo = (IFolderInfo) rcInfo;
View Full Code Here

Examples of org.eclipse.cdt.managedbuilder.core.IFileInfo

    IFolderInfo fo = (IFolderInfo) rcInfo;
    h.buildTools = fo.getFilteredTools();
    h.buildToolsUsed = new boolean[h.buildTools.length];
    h.gnuToolInfos = new ArduinoManagedBuildGnuToolInfo[h.buildTools.length];
      } else {
    IFileInfo fi = (IFileInfo) rcInfo;
    h.buildTools = fi.getToolsToInvoke();
    h.buildToolsUsed = new boolean[h.buildTools.length];
    h.gnuToolInfos = new ArduinoManagedBuildGnuToolInfo[h.buildTools.length];
      }
  }
    }
View Full Code Here

Examples of org.eclipse.core.filesystem.IFileInfo

      public void run() {
        IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
        if (window == null)
          return;
        IFileStore fileStore = EFS.getLocalFileSystem().getStore(new Path(path));
        IFileInfo fetchInfo = fileStore.fetchInfo();
        if (!fetchInfo.isDirectory() && fetchInfo.exists()) {
          IWorkbenchPage page = window.getActivePage();
          if (page == null) {
            String msg = NLS.bind(IDEWorkbenchMessages.OpenDelayedFileAction_message_noWindow, path);
            MessageDialog.open(MessageDialog.ERROR, window.getShell(),
                IDEWorkbenchMessages.OpenDelayedFileAction_title,
View Full Code Here

Examples of org.eclipse.core.filesystem.IFileInfo

        if (filePath != null) {
            final IPath path = new Path(filePath);
            IFileStore fileStore = EFS.getLocalFileSystem().getStore(
                    path.removeLastSegments(1));
            fileStore = fileStore.getChild(path.lastSegment());
            final IFileInfo fetchInfo = fileStore.fetchInfo();
            if (!fetchInfo.isDirectory() && fetchInfo.exists()) {
                if (element instanceof IErlModule
                        && element.getParent() instanceof IErlExternal) {
                    return new ErlangExternalEditorInput(fileStore, (IErlModule) element);
                }
                return new FileStoreEditorInput(fileStore);
View Full Code Here

Examples of org.eclipse.core.filesystem.IFileInfo

    private static IFile resolveFile(final IFile file) {
        IFile result = file;
        if (file.getResourceAttributes().isSymbolicLink()) {
            try {
                final File f = new File(file.getLocation().toString());
                final IFileInfo info = EFS.getFileSystem(EFS.SCHEME_FILE)
                        .fromLocalFile(f).fetchInfo();
                final String target = info.getStringAttribute(EFS.ATTRIBUTE_LINK_TARGET);
                if (target != null) {
                    // FIXME this is wrong in the general case
                    // find the file in the externals!
                    result = (IFile) file.getParent().findMember(target);
                    if (result == null) {
View Full Code Here

Examples of org.eclipse.core.filesystem.IFileInfo

      try {
        File localFile = store.getLocalFile();
        if (logger.isDebugEnabled())
          logger.debug("[" + uri + "]: Downloading to " + (localFile == null ? "(null)" : localFile.toString()));
        HDFSManager.INSTANCE.startServerOperation(uri.toString());
        final IFileInfo serverInfo = store.fetchInfo();
        if (serverInfo.exists()) {
          monitor.beginTask("Downloading " + uri.toString(), (int) serverInfo.getLength());
          if (!localFile.exists()) {
            localFile.getParentFile().mkdirs();
            localFile.createNewFile();
          }
          InputStream openInputStream = store.openRemoteInputStream(EFS.NONE, new NullProgressMonitor());
          FileOutputStream fos = new FileOutputStream(localFile);
          try {
            if (!monitor.isCanceled()) {
              byte[] data = new byte[8 * 1024];
              int totalRead = 0;
              int read = openInputStream.read(data);
              while (read > -1) {
                if (monitor.isCanceled())
                  throw new InterruptedException();
                fos.write(data, 0, read);
                totalRead += read;
                monitor.worked(read);
                read = openInputStream.read(data);
                if (logger.isDebugEnabled())
                  logger.debug("Downloaded " + totalRead + " out of " + serverInfo.getLength() + " [" + (((float)totalRead*100.0f) / (float)serverInfo.getLength())
                      + "]");
              }
            }
          } catch (IOException e) {
            throw e;
View Full Code Here

Examples of org.eclipse.core.filesystem.IFileInfo

        if (location == null) {
            result.addFatalError(String.format("The location for file %s is unknown", path));
            return result;
        }

        IFileInfo jFile = EFS.getStore(location).fetchInfo();
        if (jFile.exists()) {
            result.addFatalError(String.format("File %s already exists", path));
            return result;
        }
        return result;
    }
View Full Code Here

Examples of org.eclipse.core.filesystem.IFileInfo

            StringBuffer notFound = new StringBuffer();
            IWorkbenchPage page = window.getActivePage();
            for ( String name : names )
            {
                IFileStore fileStore = EFS.getLocalFileSystem().getStore( new Path( filterPath ) ).getChild( name );
                IFileInfo fetchInfo = fileStore.fetchInfo();
                if ( !fetchInfo.isDirectory() && fetchInfo.exists() )
                {
                    try
                    {
                        IDE.openEditorOnFileStore( page, fileStore );
                    }
View Full Code Here

Examples of org.eclipse.core.filesystem.IFileInfo

    return locationInFileSystem(path);
  }

  private String locationInFileSystem(IPath path) {
    IFileSystem fileSystem = EFS.getLocalFileSystem();
    IFileInfo fileInfo = fileSystem.getStore(path).fetchInfo();
    if (!fileInfo.isDirectory()) {
      return null;
    }
    return value;
  }
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.