Class ModuleRootPropCnr

All Implemented Interfaces:
IPropDesigner, ISynchronizeEclipseMarkers, EventListener, IGProp<GProp<?>[]>, IModuleProjectPropProvider, IPropCnr, IPropRoot, ISynchronizeMarkers, Cloneable, IAdaptable

public final class ModuleRootPropCnr extends ProjectRootPropCnr implements IPropDesigner, ISynchronizeEclipseMarkers, IModuleProjectPropProvider
The module root property container.
Author:
Christopher Mindus
  • Method Details

    • isPropRootLoading

      public final boolean isPropRootLoading()
      Checks if the root property container is currently loading properties from Jar or files to avoid reference checking until the end.
      Overrides:
      isPropRootLoading in class GProp<GProp<?>[]>
      Returns:
      The loading flag, always false unless overridden by the real root property that handles loading.
    • isPropReferenceTreeValid

      public boolean isPropReferenceTreeValid()
      Verifies if the tree is valid for reference creation. This method is typically overridden in a root property that has a Property Manager owner that in turn is checked for a particular configuration (e.g. Client-related references such as LabelForReference that does not create references when communicating).

      The code implementation for a root property should be:

           return (!isDisposed() invalid input: '&'invalid input: '&' getPropRootPropMgr()!=null);
       

      Specified by:
      isPropReferenceTreeValid in interface IGProp<GProp<?>[]>
      Specified by:
      isPropReferenceTreeValid in interface IPropRoot
      Overrides:
      isPropReferenceTreeValid in class ProjectRootPropCnr
      Returns:
      true if the root property manager is found, false otherwise.
    • onPropDispose

      protected void onPropDispose()
      Called when a property is disposed of by delete/remove in a container, or by the dispose method.

      This call is done just at the end of the delete/remove routine in the container, without synchronization.

      During this call, whatever components that e.g. the client needs to disposed of is done.

      Subclasses needing to perform some intelligent operations upon deletion should do it by overloading this method and always call the super.onPropDispose() method.

      Overrides:
      onPropDispose in class PropCnr
    • clone

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

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

      public ModuleModel getModel()
      Gets the model.
    • onResetDependencyModulesAndProjects

      protected void onResetDependencyModulesAndProjects()
      Method called to clear and initialize the initially dependent projects and modules of the project.
      Specified by:
      onResetDependencyModulesAndProjects in class ProjectRootPropCnr
    • getRootFromName

      public PropCnr getRootFromName(GProp<?> requestor, String module)
      Gets the module root for a name. As this is the Designer, the module is the project.
      Specified by:
      getRootFromName in interface IModuleProjectPropProvider
      Overrides:
      getRootFromName in class ProjectRootPropCnr
      Parameters:
      requestor - The requestor property.
      module - The module name (without colon), i.e. the project name in the Designer.
      Returns:
      The root property container, or null if the module name is not found.
    • onEventSelf

      public void onEventSelf(GEvent event)
      Listens to changes in the Module settings and clears the cache of aliases accordingly.
      Specified by:
      onEventSelf in interface IGProp<GProp<?>[]>
      Overrides:
      onEventSelf in class ProjectRootPropCnr
      Parameters:
      event - The property event.
    • getProjectName

      public String getProjectName(GProp<?> requestor, String alias)
      Gets the project name from an alias, the alias does NOT begin with "*".
      Specified by:
      getProjectName in interface IModuleProjectPropProvider
      Overrides:
      getProjectName in class ProjectRootPropCnr
      Parameters:
      requestor - The requestor property.
      alias - The alias name.
      Returns:
      The project name for the alias, or null if not found.
    • getAliasName

      public String getAliasName(GProp<?> requestor, String projectName)
      Gets an alias name for a project name, the alias does NOT begin with "*".
      Overrides:
      getAliasName in class ProjectRootPropCnr
      Parameters:
      requestor - The requestor property.
      projectName - The project name (without ending ':').
      Returns:
      The alias name without leading '*' for the project name, or null if not found.
    • synchronizeProjectErrorMarkers

      public void synchronizeProjectErrorMarkers()
      Recursively synchronize all error markers in the project.