Class FolderPropCnr

All Implemented Interfaces:
IPropDesigner, ISynchronizeEclipseMarkers, EventListener, IGProp<GProp<?>[]>, IPropCnr, ISelectorExpression, ISynchronizeMarkers, Cloneable, IAdaptable
Direct Known Subclasses:
ModuleFolderPropCnr

public class FolderPropCnr extends FolderURIPropCnr implements IPropDesigner, ISynchronizeEclipseMarkers
A PropCnr that can refer to an IFolder object can be loaded and saved as well as checked for modification from last time.
Author:
Christopher Mindus
  • Constructor Details

    • FolderPropCnr

      public FolderPropCnr()
      Creates a FolderPropCnr for the designer with the specified name with a null value.
    • FolderPropCnr

      public FolderPropCnr(Atom propertyAtom, IFolder folder)
      Creates a FolderPropCnr for the designer with the specified name with a null value.
      Parameters:
      propertyAtom - the property atom.
      folder - the folder.
    • FolderPropCnr

      public FolderPropCnr(Atom propertyAtom, IFolder folder, boolean checkPresence)
      Creates a FolderPropCnr for the designer with the specified name with a null value.
      Parameters:
      propertyAtom - the property atom.
      folder - the folder.
      checkPresence - flag indicating the folder is checked for presence.
  • Method Details

    • getIFolder

      public IFolder getIFolder()
      Gets the folder.
      Returns:
      The folder resource or null if not found.
    • isAssetsFolder

      public boolean isAssetsFolder()
      Checks if this folder is located in the Assets directory. This is only handled in the Editor.
    • getURI

      public URI getURI()
      Gets the file name URI for this property.
      Overrides:
      getURI in class FolderURIPropCnr
    • getDesigner

      public ResourceDesignerProp getDesigner()
      Gets the Designer Extension for Properties.
      Specified by:
      getDesigner in interface IPropDesigner
      Returns:
      The instance of the Designer Extension.
    • clone

      Clone must be overridden.
      Overrides:
      clone in class FolderURIPropCnr
      Throws:
      CloneNotSupportedException - If a subclass doesn't allow cloning, e.g. the client properties.
    • isPropFolder

      public final boolean isPropFolder()
      Checks if this is a Folder property container. It is overridden by FolderPropCnr.
      Specified by:
      isPropFolder in interface IGProp<GProp<?>[]>
      Overrides:
      isPropFolder in class FolderURIPropCnr
      Returns:
      true for FolderPropCnr, false otherwise.
    • isPropFile

      public final boolean isPropFile()
      Checks if this is a File property container. It is overridden by FilePropCnr.
      Specified by:
      isPropFile in interface IGProp<GProp<?>[]>
      Overrides:
      isPropFile in class FolderURIPropCnr
      Returns:
      true for FilePropCnr, false otherwise.
    • isFolderEmpty

      public boolean isFolderEmpty()
      Checks if this folder is empty, i.e. has no files or folders inside.
      Returns:
      true if folder is empty, false otherwise.
    • getSettings

      public EditorFolderSettingsProp getSettings()
      Gets the settings container for the folder.
      Overrides:
      getSettings in class FolderURIPropCnr
      Returns:
      null for none, otherwise the settings instance.
    • queuePanelsVerification

      public void queuePanelsVerification()
      Queues verification of all panels in this folder and its subfolders.
    • onEventSelf

      public void onEventSelf(GEvent event)
      Called when a property event is send to this property.

      A subclass can override this method to perform appropriate processing and is not required to call super.onEventSelf(e).

      Specified by:
      onEventSelf in interface IGProp<GProp<?>[]>
      Overrides:
      onEventSelf in class GProp<GProp<?>[]>
      Parameters:
      event - The property event.
    • verify

      public boolean verify(PropVerification verification)
      Verifies this property container. The check performed is the extension of classes and that no circular reference is present. It is recommended to override the method rather than the verify method.
      Specified by:
      verify in interface IGProp<GProp<?>[]>
      Overrides:
      verify in class PropCnr
      Parameters:
      verification - The property verification class.
      Returns:
      true if verification should proceed, false if disposed of and verification should not take place.
    • equalsTree

      protected Object equalsTree(PropCnr pc2, Class<? extends IGProp<?>> arrayItemClass, int how)
      Checks for equality in the whole container structure.

      NOTE: This method should not be overridden except in extreme situations, e.g. for MememtoPropCnr.

      Overrides:
      equalsTree in class FolderURIPropCnr
      Parameters:
      pc2 - The property value to compare with.
      how - Flags EQC_* values for equal checking.
      Returns:
      Both atom and value are equal on all levels.
    • hashCode

      public int hashCode()
      Returns the hash code of this object.
      Overrides:
      hashCode in class FolderURIPropCnr
      Returns:
      This object's hash code.
    • paramString

      protected String paramString(boolean includeFullProperties)
      Returns the parameter string representing the state of this event. This string is useful for debugging. Subclasses adds extra information to the string by preceding it with a comma followed by the extra information.
      Overrides:
      paramString in class FolderURIPropCnr
      Parameters:
      includeFullProperties - Flag to include full properties or not.
      Returns:
      the parameter string of this event.