Class BufferedResourceNode

All Implemented Interfaces:
IContentChangeNotifier, IEditableContent, IEditableContentExtension, IEncodedStreamContentAccessor, IModificationDate, IResourceProvider, IStreamContentAccessor, ITypedElement, IStructureComparator

public class BufferedResourceNode extends ResourceNode
A buffer for a workspace resource.
  • Constructor Details

    • BufferedResourceNode

      public BufferedResourceNode(IResource resource)
      Creates a ResourceNode for the given resource.
      resource - the resource
  • Method Details

    • isDirty

      public boolean isDirty()
    • createChild

      protected IStructureComparator createChild(IResource child)
      Description copied from class: ResourceNode
      This hook method is called from getChildren once for every member of a container resource. This implementation creates a new ResourceNode for the given child resource. Clients may override this method to create a different type of IStructureComparator or to filter children by returning null.
      createChild in class ResourceNode
      child - the child resource for which a IStructureComparator must be returned
      a ResourceNode for the given child or null
    • setContent

      public void setContent(byte[] contents)
      Description copied from class: BufferedContent
      Sets the contents. Registered content change listeners are notified.
      Specified by:
      setContent in interface IEditableContent
      setContent in class BufferedContent
      contents - the new contents
    • commit

      public void commit(IProgressMonitor pm) throws CoreException
    • replace

      public ITypedElement replace(ITypedElement child, ITypedElement other)
      Description copied from interface: IEditableContent
      This method is called on a parent to add or remove a child, or to copy the contents of a child. What to do is encoded in the two arguments as follows:
      add: dest == null src != null
      remove: dest != null src == null
      copy: dest != null src != null
      Specified by:
      replace in interface IEditableContent
      replace in class ResourceNode
      child - the existing child of this object to be replaced; if null a new child can be added.
      other - the new child to be added or replaced; if null an existing child can be removed.
      the argument dest