Package org.eclipse.core.resources

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


    final IContainer root = ResourcesPlugin.getWorkspace().getRoot();
    Job job = new WorkspaceJob(IDEWorkbenchMessages.Workspace_refreshing) {
      public IStatus runInWorkspace(IProgressMonitor monitor)
          throws CoreException {
        root.refreshLocal(IResource.DEPTH_INFINITE, monitor);
        return Status.OK_STATUS;
      }
    };
    job.setRule(root);
    job.schedule();
View Full Code Here


  }

  public static void prepareFolder(IFolder folder) {
    IContainer parent = folder.getParent();
    try {
      parent.refreshLocal(IResource.DEPTH_INFINITE, null);
    } catch (CoreException e1) {
      e1.printStackTrace();
    }

    if (parent instanceof IFolder) {
View Full Code Here

          e.getMessage(), e);
    }
    IContainer container = selectedElement.getParent();
    if (container != null) {
      try {
        container.refreshLocal(IResource.DEPTH_ONE, subMonitor.newChild(5));
      } catch (CoreException e) {
        return new Status(IStatus.ERROR, TargetPlatformActivator
            .getInstance().getBundle().getSymbolicName(),
            e.getMessage(), e);
      }
View Full Code Here

                // IPreferenceStore store = EclipsePlugin.getDefault()
                //         .getPreferenceStore();

                try {
                    IContainer container = Environment.getAffectedFolder();
                    container.refreshLocal(IResource.DEPTH_INFINITE, null);
                } catch (Exception e) {
                    e.printStackTrace(_error);
                }
                _output.flush();
                _error.flush();
View Full Code Here

      }
      String projectName = configuration.getAttribute(Constants.LAUNCH_ATTR_PROJECT, (String) null);
      IProject project = Utils.getJavaModel().getJavaProject(projectName).getProject();
      IContainer refreshFolder = project.getFolder(outPath).getParent();
      if (refreshFolder.exists() && refreshFolder.getProject() == project) {
        refreshFolder.refreshLocal(IResource.DEPTH_INFINITE, null);
      }
    } catch (Throwable e) {
    }
  }
View Full Code Here

        public void run(IProgressMonitor progressMonitor) throws InvocationTargetException, InterruptedException {
          try {
            progressMonitor.beginTask(Messages.AbstractOfficeEditorAdvisor_monitor_storing_document, 100);
            progressMonitor.worked(20);         
            document.getPersistenceService().export("file:///" + filePath.toOSString(), filter); //$NON-NLS-1$
            targetContainer.refreshLocal(1, progressMonitor);
            progressMonitor.worked(60);
            progressMonitor.done();
           
            editorPart.getEditorSite().getShell().getDisplay().asyncExec(new Runnable() {
              public void run() {
View Full Code Here

          eogenFile = parentContainer.getFile(new Path(baseName + dupeNum + ".eogen"));
        }
      }
      eogenModel.writeToFile(eogenFile, monitor);
    }
    parentContainer.refreshLocal(IResource.DEPTH_INFINITE, monitor);

    if (createModelGroup) {
      EOGeneratorModel modelGroupModel = EOGeneratorCreator.createDefaultModel(_parentResource.getProject());
      if (modelFolder != null) {
        Path modelPath = new Path(modelFolderFile.getAbsolutePath());
View Full Code Here

      File parentDir = file.getParentFile();
      if (!parentDir.exists()) {
        parentDir.mkdirs();
      }
      IContainer folder = root.getContainerForLocation(new Path(parentDir.getPath()));
      folder.refreshLocal(IResource.DEPTH_ZERO, null);
      // Keep charset of component folder and HTML template in sync
      if ("wo".equals(folder.getFileExtension()) && file.getPath().endsWith("html")
          && !encoding.equals(folder.getDefaultCharset(true))) {
        System.out.println("AbstractEngine.run: setting encoding of " + folder + " to " + encoding);
        folder.setDefaultCharset(encoding, null);
View Full Code Here

        }
        openError(status);
        IContainer target = getActualTarget((IResource) getCurrentTarget(aDropAdapter));
        if (target != null && target.isAccessible()) {
            try {
                target.refreshLocal(IResource.DEPTH_ONE, null);
            } catch (CoreException e) {
            }
        }
        return status;
    }
View Full Code Here

        MoveFilesAndFoldersOperation operation = new MoveFilesAndFoldersOperation(getShell());
        operation.copyResources(resources, target);

        if (target != null && target.isAccessible()) {
            try {
                target.refreshLocal(IResource.DEPTH_ONE, null);
            } catch (CoreException e) {
            }
        }
        return Status.OK_STATUS;
    }
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.