public class ModuleModel extends Object
Modifier and Type | Field and Description |
---|---|
static String |
LOAD_FILE_MARKER_ID
The marker ID for load file problems.
|
static String |
MISSING_RESOURCE_MARKER_ID
The marker ID for missing project resource problems.
|
static String |
MODULE_DIRECTORY_NAME
The ".iiziModule" module directory name, where files are stored.
|
static String |
MODULE_SETTINGS_FILE_NAME
The ".iiziModuleProject" file name containing all settings.
|
IFile |
moduleSettings
The iizi Module settings file, null when creating new model project.
|
static String |
RESOURCE_NAME_MARKER_ID
The marker ID for resource name problems.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addCommitRefactoringListener(ICommitRefactoring listener,
RefactoringOperation... operations)
Adds a listener for Commit Refactoring in this project.
|
void |
addPlugin(PluginDescriptor pd,
boolean doCreateDir)
Adds a plug-in to this Module project instance, without creating anything.
|
boolean |
addResourceListener(IModuleProjectResourceListener listener)
Adds a new resource listener when a resource is added or removed.
|
void |
cleanRebuildPropertyMarkers()
Cleans the property error markers from this project and rebuilds them.
|
void |
clearInstalledFontsMapCache()
Clears the installed font map cache.
|
static ModuleModel |
from(IProject project)
Gets the module model from a project if possible.
|
IFile |
getAppDistributionFile()
Gets the application distribution file.
|
ModuleFolder |
getAssetsModuleFolder()
Gets the module folder for assets.
|
IFolder |
getBaseModuleFolder()
Gets the base module folder ".iiziModule".
|
List<IProject> |
getBuildPathProjects()
Gets the Java projects that are included on the classpath of this project.
|
Object[] |
getCNChildren()
Gets the children (just one) for the root container for the Common Navigator.
|
ModuleFolder |
getImageDefinitionModuleFolder()
Gets the module folder for image definitions.
|
List<EditorFontFiles> |
getInstalledFonts()
Gets all the installed fonts in this project and all projects referenced.
|
Map<String,List<FontFiles>> |
getInstalledFontsMap()
Gets the map of installed fonts.
|
IJavaProject |
getJavaProject()
Gets the Java Project instance for this project.
|
JavaRootContainer |
getJavaPropCnr()
Gets the property container for a project.
|
ModuleFolder |
getModuleFolder(PluginDescriptor pd)
Gets the module folder for a plug-in.
|
ModuleFolder |
getModuleFolder(String type)
Gets the array of folders defined for the module project.
|
ModuleFolder[] |
getModuleFolders()
Gets the array of folders defined for the module project.
|
String[] |
getModuleNameReferences()
Gets the Modules that are referenced by this Module project.
|
ModuleModel[] |
getModuleProjectReferences()
Gets the Projects that are referenced by this Module project.
|
ModuleFolder |
getPanelModuleFolder()
Gets the module folder for panels.
|
PluginDescriptor[] |
getPlugins()
Gets the associated plug-ins.
|
IProject |
getProject()
Gets the project.
|
IProject[] |
getProjectReferences(boolean onlyModuleProjects)
Gets the Projects that are referenced by this Module project.
|
IFolder[] |
getQuickFixCreateFolders()
Gets the array of folders required to be created.
|
ResourceDesignerProp[] |
getReferencedDesignerPropModules()
Gets the designer properties of the module models that are referenced
by this Module project.
|
ModuleRootPropCnr |
getRootContainer()
Gets the root container.
|
ModuleFolder |
getSelectorModuleFolder()
Gets the module folder for selectors.
|
ModuleProjectSettings |
getSettings()
Gets the Module Project Settings.
|
ModuleFolder |
getStyleModuleFolder()
Gets the module folder for styles.
|
EditorFontFiles[] |
getStylesFontFiles()
Gets the fonts installed in this module project.
|
ModuleFolder |
getTextTableModuleFolder()
Gets the module folder for text tables.
|
ModuleFolder |
getVirtualSpaceModuleFolder()
Gets the module folder for VirtualSpace.
|
boolean |
hasCompletedLoading()
Verifies if project has completed loading.
|
boolean |
isDisposed()
Checks if the Module project is disposed of.
|
boolean |
isModuleSettingsFile(IResource file)
Checks if the file is the module settings file.
|
boolean |
isOnClassPath(IResource resource)
Checks if a resource is inside the classpath of this Module project.
|
boolean |
isPluginActive(PluginDescriptor pd)
Checks if a plug-in is active in the Module project.
|
String |
isReservedResource(IResource resource)
Checks if the resource is a reserved resource.
|
void |
markModuleReference(ModuleModel module)
Marks a Module as being used by or referenced in this project.
|
void |
markModuleReference(String moduleName)
Marks a Module as being used by or referenced in this project.
|
boolean |
removeCommitRefactoringListener(ICommitRefactoring listener)
Removes a listener for Commit Refactoring in this project.
|
int |
removePlugin(PluginDescriptor pd)
Removes the specified plug-in from this project.
|
boolean |
removeResourceListener(IModuleProjectResourceListener listener)
Removes a new resource listener when a resource is added or removed.
|
void |
saveClasspath()
Saves the Java classpath of a project in order to be able to use it in the Server.
|
void |
saveSettings()
Saves the settings when possible.
|
CoreException |
saveSettings(Shell shell)
Saves the module settings.
|
void |
scheduleCleanAndRebuild()
Schedules a full build of a project.
|
boolean |
validateProjectResourcePresence()
Validates the presence of the required project resources and the problem markers for the project.
|
public static final String RESOURCE_NAME_MARKER_ID
public static final String LOAD_FILE_MARKER_ID
public static final String MISSING_RESOURCE_MARKER_ID
public static final String MODULE_DIRECTORY_NAME
public static final String MODULE_SETTINGS_FILE_NAME
public final IFile moduleSettings
public static ModuleModel from(IProject project)
project
- The project.public IFile getAppDistributionFile()
public JavaRootContainer getJavaPropCnr()
public ModuleProjectSettings getSettings()
public String isReservedResource(IResource resource)
resource
- File or Folder to check.public boolean isDisposed()
public IJavaProject getJavaProject()
public void addPlugin(PluginDescriptor pd, boolean doCreateDir) throws CoreException
pd
- The plug-in description.doCreateDir
- Flag to create the directory of the plug-in, if it is directory/file plug-in.CoreException
- For errors.public PluginDescriptor[] getPlugins()
public int removePlugin(PluginDescriptor pd) throws CoreException
pd
- The plug-in description.CoreException
- For errors.public boolean isPluginActive(PluginDescriptor pd)
public IFolder getBaseModuleFolder()
public ModuleFolder getVirtualSpaceModuleFolder()
public ModuleFolder getPanelModuleFolder()
public ModuleFolder getStyleModuleFolder()
public ModuleFolder getSelectorModuleFolder()
public ModuleFolder getImageDefinitionModuleFolder()
public ModuleFolder getAssetsModuleFolder()
public ModuleFolder getTextTableModuleFolder()
public ModuleFolder getModuleFolder(String type)
type
- The type, e.g. "panel".public ModuleFolder getModuleFolder(PluginDescriptor pd)
pd
- The plug-in descriptor.public ModuleFolder[] getModuleFolders()
public IProject getProject()
public ModuleRootPropCnr getRootContainer()
public Object[] getCNChildren()
public boolean hasCompletedLoading()
public boolean validateProjectResourcePresence()
public IFolder[] getQuickFixCreateFolders()
public void saveSettings()
public CoreException saveSettings(Shell shell)
shell
- Shell used for error message, null for logging only.public boolean isModuleSettingsFile(IResource file)
file
- The file to test with.public boolean isOnClassPath(IResource resource)
resource
- The resource to check.public void markModuleReference(ModuleModel module)
module
- The module to mark as referenced.public void markModuleReference(String moduleName)
moduleName
- The module name to mark as referenced.public String[] getModuleNameReferences()
public IProject[] getProjectReferences(boolean onlyModuleProjects)
onlyModuleProjects
- Flag for only module projects,
or if Java projects should be added too.public ModuleModel[] getModuleProjectReferences()
public ResourceDesignerProp[] getReferencedDesignerPropModules()
public List<IProject> getBuildPathProjects()
public boolean addCommitRefactoringListener(ICommitRefactoring listener, RefactoringOperation... operations)
listener
- The listener.operations
- The operations of interest.public boolean removeCommitRefactoringListener(ICommitRefactoring listener)
listener
- The listener.public void scheduleCleanAndRebuild()
public void cleanRebuildPropertyMarkers()
public void saveClasspath()
public List<EditorFontFiles> getInstalledFonts()
public EditorFontFiles[] getStylesFontFiles()
public Map<String,List<FontFiles>> getInstalledFontsMap()
public void clearInstalledFontsMapCache()
public boolean addResourceListener(IModuleProjectResourceListener listener)
listener
- The listener to add.NullPointerException
- If the listener is null
.public boolean removeResourceListener(IModuleProjectResourceListener listener)
listener
- The listener to remove.iizi® is a registered trademark of Mindus SARL. © Copyright Mindus SARL, 2020. All rights reserved.