Class FolderPropCnr

All Implemented Interfaces:
IPropDesigner, ISynchronizeEclipseMarkers, EventListener, IGProp<GProp<?>[]>, IPropCnr, ISelectorExpression, ISynchronizeMarkers, Cloneable, org.eclipse.core.runtime.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, org.eclipse.core.resources.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, org.eclipse.core.resources.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 org.eclipse.core.resources.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.