Class ModuleFolder

java.lang.Object
com.iizigo.project.ModuleFolder

public class ModuleFolder extends Object
The module folder is a separate directory in the module project that stores property containers in files with a predefined file extension, and that only has directories with names that end with the same file extension (in order not to have name collision with properties, i.e. you cannot have the file a.iiziPanel and a directory with the same name in a single directory).
Author:
Christopher Mindus
  • Field Details

    • name

      public final String name
      The name of the folder, used for directory and property name.
    • title

      public final String title
      The title for the folder, displayed in the IIZI Explorer.
    • description

      public final String description
      The description of the folder, displayed in the status bar in Eclipse when the folder is selected.
    • folderImageDescriptor

      public final ImageDescriptor folderImageDescriptor
      The image for the folder.
    • itemTitle

      public final String itemTitle
      The item title (e.g. "Panel").
    • itemImageDescriptor

      public final ImageDescriptor itemImageDescriptor
      The image for the items.
    • extension

      public final String extension
      The file extension used, including the '.'.
    • isAssets

      public final boolean isAssets
      Flag indicating it's the Assets folder.
    • category

      public final int category
      The Common Navigator category of the module folder.
  • Method Details

    • getModuleFolder

      public static ModuleFolder getModuleFolder(ArrayList<DesignerProp> list)
      Gets the Module Folder used for the selected properties. This method returns null when properties of different modules are selected, or if the root or module folder are selected.
      Parameters:
      list - The selected properties.
      Returns:
      The ModuleFolder for the properties, or null if no such can be set.
    • getFolderSettingsSetup

      public PropertyEditorSetup getFolderSettingsSetup()
      Gets the folder settings setup.
      Returns:
      The setup for folder settings, null for none.
    • addAcceptedBaseProperty

      public void addAcceptedBaseProperty(Class<? extends PropCnr> propertyClass)
      Adds an accepted class for base properties as files in this folder.
      Parameters:
      propertyClass - The property class.
    • isPropertyClassAccepted

      public boolean isPropertyClassAccepted(IGProp<?> property)
      Checks if a property class instance is accepted.
    • getModuleModel

      public ModuleModel getModuleModel()
      Gets the Module Model.
      Returns:
      The module model.
    • getProject

      public IProject getProject()
      Gets the project.
      Returns:
      The project.
    • getDirectory

      public IFolder getDirectory()
      Gets the IFolder for the folder root directory.
    • getDirectoryPath

      public String getDirectoryPath()
      Gets the directory path relative the project, ending with '/'.
    • getContainer

      public ModuleFolderPropCnr getContainer()
      Gets the property container.
    • getFolderImage

      public Image getFolderImage()
      Gets the folder image.
    • getItemImage

      public Image getItemImage()
      Gets the item image.
    • isFolderPath

      public boolean isFolderPath(String path)
      Checks if a project-relative path is in this folder.
    • getPropertyFromResource

      public ResourceDesignerProp getPropertyFromResource(IResource resource)
      Gets a property from a resource located or was located under this folder.
      Parameters:
      resource - The resource.
      Returns:
      null if not found.
    • getCNChildren

      public Object[] getCNChildren()
      Gets the children for the content provider tree viewer for this folder. It's just one: the container.
    • createFilter

      public ViewerFilter createFilter()
      Creates a viewer filter only displaying items of this folder.