Package com.iizigo.project
Class ModuleFolder
java.lang.Object
com.iizigo.project.ModuleFolder
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 Summary
Modifier and TypeFieldDescriptionfinal int
The Common Navigator category of the module folder.final String
The description of the folder, displayed in the status bar in Eclipse when the folder is selected.final String
The file extension used, including the '.'.final org.eclipse.jface.resource.ImageDescriptor
The image for the folder.final boolean
Flag indicating it's the Assets folder.final org.eclipse.jface.resource.ImageDescriptor
The image for the items.final String
The item title (e.g.final String
The name of the folder, used for directory and property name.final String
The title for the folder, displayed in the IIZI Explorer.Method Summary
Modifier and TypeMethodDescriptionvoid
addAcceptedBaseProperty
(Class<? extends PropCnr> propertyClass) Adds an accepted class for base properties as files in this folder.org.eclipse.jface.viewers.ViewerFilter
Creates a viewer filter only displaying items of this folder.Object[]
Gets the children for the content provider tree viewer for this folder.Gets the property container.org.eclipse.core.resources.IFolder
Gets the IFolder for the folder root directory.Gets the directory path relative the project, ending with '/'.org.eclipse.swt.graphics.Image
Gets the folder image.Gets the folder settings setup.org.eclipse.swt.graphics.Image
Gets the item image.static ModuleFolder
getModuleFolder
(ArrayList<DesignerProp> list) Gets the Module Folder used for the selected properties.Gets the Module Model.org.eclipse.core.resources.IProject
Gets the project.getPropertyFromResource
(org.eclipse.core.resources.IResource resource) Gets a property from a resource located or was located under this folder.boolean
isFolderPath
(String path) Checks if a project-relative path is in this folder.boolean
isPropertyClassAccepted
(IGProp<?> property) Checks if a property class instance is accepted.
Field Details
name
The name of the folder, used for directory and property name.title
The title for the folder, displayed in the IIZI Explorer.description
The description of the folder, displayed in the status bar in Eclipse when the folder is selected.folderImageDescriptor
public final org.eclipse.jface.resource.ImageDescriptor folderImageDescriptorThe image for the folder.itemTitle
The item title (e.g. "Panel").itemImageDescriptor
public final org.eclipse.jface.resource.ImageDescriptor itemImageDescriptorThe image for the items.extension
The file extension used, including the '.'.isAssets
public final boolean isAssetsFlag indicating it's the Assets folder.category
public final int categoryThe Common Navigator category of the module folder.
Method Details
getModuleFolder
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
Gets the folder settings setup.- Returns:
- The setup for folder settings, null for none.
addAcceptedBaseProperty
Adds an accepted class for base properties as files in this folder.- Parameters:
propertyClass
- The property class.
isPropertyClassAccepted
Checks if a property class instance is accepted.getModuleModel
Gets the Module Model.- Returns:
- The module model.
getProject
public org.eclipse.core.resources.IProject getProject()Gets the project.- Returns:
- The project.
getDirectory
public org.eclipse.core.resources.IFolder getDirectory()Gets the IFolder for the folder root directory.getDirectoryPath
Gets the directory path relative the project, ending with '/'.getContainer
Gets the property container.getFolderImage
public org.eclipse.swt.graphics.Image getFolderImage()Gets the folder image.getItemImage
public org.eclipse.swt.graphics.Image getItemImage()Gets the item image.isFolderPath
Checks if a project-relative path is in this folder.getPropertyFromResource
Gets a property from a resource located or was located under this folder.- Parameters:
resource
- The resource.- Returns:
- null if not found.
getCNChildren
Gets the children for the content provider tree viewer for this folder. It's just one: the container.createFilter
public org.eclipse.jface.viewers.ViewerFilter createFilter()Creates a viewer filter only displaying items of this folder.