Package org.eclipse.core.resources

Examples of org.eclipse.core.resources.IResourceDelta


        boolean incremental = (kind != IncrementalProjectBuilder.FULL_BUILD);
        IProject project = getProject();
        IResource resource = project;
        List<WorkItem> files;
        if (incremental) {
            IResourceDelta resourceDelta = getDelta(project);
            boolean configChanged = !isConfigUnchanged(resourceDelta);
            boolean fullBuildEnabled = FindbugsPlugin.getCorePreferences(getProject(), configChanged).isRunAtFullBuild();
            if (configChanged && fullBuildEnabled) {
                files = new ArrayList<WorkItem>();
                files.add(new WorkItem(project));
View Full Code Here


  class ResourceChangeListener implements IResourceChangeListener {
    /*
     * @see IResourceChangeListener#resourceChanged(org.eclipse.core.resources.IResourceChangeEvent)
     */
    public void resourceChanged(IResourceChangeEvent e) {
      IResourceDelta delta= e.getDelta();
      if (delta != null && fResource != null) {
        IResourceDelta child= delta.findMember(fResource.getFullPath());
        if (child != null)
          update(child.getMarkerDeltas());
      }
    }
View Full Code Here

    /*
     * @see IResourceChangeListener#resourceChanged(IResourceChangeEvent)
     */
    public void resourceChanged(IResourceChangeEvent e) {
      IResourceDelta delta= e.getDelta();
      try {
        if (delta != null && fIsInstalled)
          delta.accept(this);
      } catch (CoreException x) {
        handleCoreException(x, "FileDocumentProvider.resourceChanged"); //$NON-NLS-1$
      }
    }
View Full Code Here

            closeEditor();
        }

        // Close the editor if its resource was deleted/moved
        if ((event.getType() == IResourceChangeEvent.POST_CHANGE)) {
            IResourceDelta delta = event.getDelta();
            try {
                delta.accept(new IResourceDeltaVisitor() {
                    public boolean visit(IResourceDelta iResourceDelta) {
                        if (file.equals(iResourceDelta.getResource()) &&
                                (iResourceDelta.getKind() ==
                                                IResourceDelta.REMOVED ||
                                 iResourceDelta.getKind() ==
View Full Code Here

    /*
     * @see IResourceChangeListener#resourceChanged(IResourceChangeEvent)
     */
    public void resourceChanged(IResourceChangeEvent e) {
        IResourceDelta delta = e.getDelta();
        try {
            if (delta != null && installed) {
                delta.accept(this);
            }
        } catch (CoreException x) {
            EclipseCommonPlugin.handleError(ABPlugin.getDefault(), x);
        }
    }
View Full Code Here

            // Full build. Use a ResourceVisitor to process the project resource
            // tree.
            performBuild();
        } else {
            // Build with a delta (Auto/Incremental).
            IResourceDelta delta = getDelta(getProject());
            if (delta == null) {
                performBuild();
            } else {
                performBuild(delta);
            }
View Full Code Here

  @SuppressWarnings("rawtypes")
  protected IProject[] build(int kind, Map args, IProgressMonitor monitor) throws CoreException {
    if (kind == FULL_BUILD) {
      fullBuild(monitor);
    } else {
      IResourceDelta delta = getDelta(getProject());
      if (delta == null) {
        fullBuild(monitor);
      } else {
        incrementalBuild(delta, monitor);
      }
View Full Code Here

public class EditorUtils {

    public static synchronized void closeEditorIfRequired(IResourceChangeEvent event, final IFile file, final IEditorPart editor) {
        if (event.getType() == IResourceChangeEvent.POST_CHANGE) {
            IResourceDelta delta = event.getDelta().findMember(file.getFullPath());
            if (delta != null) {
                IResourceDeltaVisitor visitor = new IResourceDeltaVisitor() {
                    public boolean visit(IResourceDelta delta) {
                        if (delta.getKind() == IResourceDelta.REMOVED) {
                            if (file.equals(delta.getResource())) {
                                Display.getDefault().asyncExec(new Runnable() {
                                    public void run() {
                                        try {
                                            editor.getSite().getPage().closeEditor(editor, false);
                                        } catch (Exception e) {
                                            DesignerLogger.logErrorWithoutDialog("Close editor on delete", e);
                                        }
                                    }
                                });
                                return false;
                            }
                        }
                        return true;
                    }
                };
                try {
                    delta.accept(visitor);
                } catch (CoreException e) {
                    DesignerLogger.logErrorWithoutDialog("Visit on delete", e);
                }
            }
        }
View Full Code Here

   * @param delta the <code>IResourceDelta</code>
   * @param file the <code>IFile</code>
   * @return true if the file is contained, otherwise false
   */
  public static boolean contains(IResourceDelta delta, IFile file){
    IResourceDelta member = delta.findMember(file.getFullPath());
    if(member==null){
      return false;
    }
    return true;
  }
View Full Code Here

      return null;
    }
    if(kind==FULL_BUILD){
      processContainer(getProject());
    }
    IResourceDelta delta = getDelta(getProject());
    if(delta==null){
      return null;
    }
    processDelta(delta);
   
View Full Code Here

TOP

Related Classes of org.eclipse.core.resources.IResourceDelta

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.