Package org.eclipse.core.internal.resources

Examples of org.eclipse.core.internal.resources.ResourceInfo


          if (!project.isOpen()){
            project.open(IResource.NONE, null);
            close = true;
          }*/

          ResourceInfo pinfo = ((Project)project).getResourceInfo(false, false);
          ProjectDescription desc = ((ProjectInfo)pinfo).getDescription();
          if (desc != null){
            HashMap<IPath, LinkDescription> linfo =
              (HashMap<IPath, LinkDescription>)desc.getLinks();
            if (linfo != null){
View Full Code Here


      return ((ResourceInfo) o2).isSet(M_PHANTOM) ? IResourceDelta.ADDED_PHANTOM : IResourceDelta.ADDED;
    if (o2 == null)
      return ((ResourceInfo) o1).isSet(M_PHANTOM) ? IResourceDelta.REMOVED_PHANTOM : IResourceDelta.REMOVED;
    if (!(o1 instanceof ResourceInfo && o2 instanceof ResourceInfo))
      return IResourceDelta.NO_CHANGE;
    ResourceInfo oldElement = (ResourceInfo) o1;
    ResourceInfo newElement = (ResourceInfo) o2;
    if (!oldElement.isSet(M_PHANTOM) && newElement.isSet(M_PHANTOM))
      return IResourceDelta.REMOVED;
    if (oldElement.isSet(M_PHANTOM) && !newElement.isSet(M_PHANTOM))
      return IResourceDelta.ADDED;
    if (!compareOpen(oldElement, newElement))
      result |= IResourceDelta.OPEN;
    if (!compareContents(oldElement, newElement)) {
      if (oldElement.getType() == IResource.PROJECT)
        result |= IResourceDelta.DESCRIPTION;
      else
        result |= IResourceDelta.CONTENT;
    }
    if (!compareType(oldElement, newElement))
      result |= IResourceDelta.TYPE;
    if (!compareNodeIDs(oldElement, newElement)) {
      result |= IResourceDelta.REPLACED;
      // if the node was replaced and the old and new were files, this is also a content change.
      if (oldElement.getType() == IResource.FILE && newElement.getType() == IResource.FILE)
        result |= IResourceDelta.CONTENT;
    }
    if (!compareCharsets(oldElement, newElement))
      result |= IResourceDelta.ENCODING;
    if (notification && !compareSync(oldElement, newElement))
View Full Code Here

TOP

Related Classes of org.eclipse.core.internal.resources.ResourceInfo

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.