Package org.eclipse.core.resources

Examples of org.eclipse.core.resources.IFile.refreshLocal()


            config.put(ResourceIndexer.PRETTY, "true");

            output = new FileOutputStream(indexFile);
            indexer.index(files, output, config);
            IO.close(output);
            indexPath.refreshLocal(IResource.DEPTH_ZERO, null);
            if (indexPath.exists())
                indexPath.setDerived(true, null);
        } catch (Exception e) {
            logger.logError(MessageFormat.format("Failed to generate index file for bundles in project {0}.", project.getName()), e);
            return;
View Full Code Here


            config.put(ResourceIndexer.PRETTY, "true");

            output = new FileOutputStream(indexFile);
            indexer.index(files, output, config);
            IO.close(output);
            indexPath.refreshLocal(IResource.DEPTH_ZERO, null);
            if (indexPath.exists())
                indexPath.setDerived(true);
        } catch (Exception e) {
            logger.logError(MessageFormat.format("Failed to generate index file for bundles in project {0}.", project.getName()), e);
            return;
View Full Code Here

    IWorkspace workspace = ResourcesPlugin.getWorkspace();
    IFile file = workspace.getRoot().getFileForLocation(resultPath);

    if (file != null && !file.isSynchronized(IResource.DEPTH_ZERO)) {
      try {
        file.refreshLocal(IResource.DEPTH_ZERO, new NullProgressMonitor());
      } catch (CoreException e) {
        RutaAddonsPlugin.error(e);
      }
    }
    try {
View Full Code Here

                public void run() {
                    model.saveChangesTo(finalDoc);

                    try {
                        writeFully(finalDoc.get(), resource, false);
                        resource.refreshLocal(IResource.DEPTH_ZERO, null);
                    } catch (CoreException e) {
                        throw new RuntimeException(e);
                    }
                }
            };
View Full Code Here

        public void run() {
          model.saveChangesTo(finalDoc);

          try {
            writeFully(finalDoc.get(), resource, false);
            resource.refreshLocal(IResource.DEPTH_ZERO, null);
          } catch (CoreException e) {
            throw new RuntimeException(e);
          }
        }
      };
View Full Code Here

    IFile target = getProject().getFile(filename);
    assertTrue("File '" + target + "' exists", target.exists());
   
    Properties p = new Properties();
    target.refreshLocal(IResource.DEPTH_INFINITE, monitor)// refresh
    p.load(target.getContents());

    return p;
  }
 
View Full Code Here

    IWorkspace workspace = ResourcesPlugin.getWorkspace();
    IFile file = workspace.getRoot().getFileForLocation(resultPath);

    if (file != null && !file.isSynchronized(IResource.DEPTH_ZERO)) {
      try {
        file.refreshLocal(IResource.DEPTH_ZERO, new NullProgressMonitor());
      } catch (CoreException e) {
        RutaAddonsPlugin.error(e);
      }
    }
    try {
View Full Code Here

    }

    public static IFile getAdjacentFile(IFolder folder, String fileName) {
        IFile file = folder.getFile(fileName);
        try {
            file.refreshLocal(IResource.DEPTH_ONE, null);
        } catch (CoreException e) {
            DesignerLogger.logErrorWithoutDialog("", e);
        }
        return file;
    }
View Full Code Here

      IFolder folder = getPlanFolderFromPEX(this.file);
      IFile conFile = folder.getFile(constant.toolName + ".CON");
      if (!conFile.exists()){
        InputStream source = new ByteArrayInputStream(constant.toSource().getBytes());
        conFile.create(source, false, null);
        conFile.refreshLocal(IResource.DEPTH_ZERO, null);
      }
    } catch (CoreException e) {
      ToolModelActivator.log(IStatus.ERROR, "Cannot create constant file", e);
    }
  }
View Full Code Here

     
      ProcessExitDetector processExitDetector = new ProcessExitDetector(this.editorProcess);
        processExitDetector.addProcessListener(new ProcessListener() {
            public void processFinished(Process process) {
                try {
            windowFile.refreshLocal(IResource.DEPTH_ZERO, null);
          } catch (CoreException e) {
            ToolPlugin.showError("Error refreshing fsw file", e);
          }
            }
        });
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.