Class ProjectURIByClasspathRegistration

java.lang.Object
tools.mdsd.library.standalone.initialization.impl.InitializationTaskWrapper
tools.mdsd.library.standalone.initialization.impl.ProjectURIByClasspathRegistration
All Implemented Interfaces:
InitializationTask

public class ProjectURIByClasspathRegistration extends InitializationTaskWrapper
Registers URIs in the EMF platform for a given project. After the registration, platform resource and platform plugin URIs can properly be resolved for this project. The location of the project is determined by a class of this project and a root folder name.
  • Constructor Details

    • ProjectURIByClasspathRegistration

      public ProjectURIByClasspathRegistration(Class<?> classOfProject, String projectName, String projectRootFolderName)
      Constructs the project registration task.
      Parameters:
      classOfProject - A class within the project to be registered.
      projectName - The name of the project to be registered.
      projectRootFolderName - The name of the project's root folder (most probably same as project name).
  • Method Details

    • createDelegate

      protected static InitializationTask createDelegate(Class<?> classOfProject, String projectName, String projectRootFolderName)
      Creates the delegate to be called, which is also a registration task for projects.
      Parameters:
      classOfProject - A class within the project to be registered.
      projectName - The name of the project to be registered.
      projectRootFolderName - The name of the project's root folder (most probably same as project name).
      Returns:
      The delegate to be used.
    • getRealProjectURI

      protected static Optional<URI> getRealProjectURI(Class<?> clz, String projectRootFolderName)
      Determine the location of a project from a given class.
      Parameters:
      clz - The class to derive the project path from.
      projectRootFolderName - The name of the root folder to get the absolute path for.
      Returns:
      Location of the project root.