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 Summary
Constructors Constructor Description ProjectURIByClasspathRegistration(Class<?> classOfProject, String projectName, String projectRootFolderName)
Constructs the project registration task.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static InitializationTask
createDelegate(Class<?> classOfProject, String projectName, String projectRootFolderName)
Creates the delegate to be called, which is also a registration task for projects.protected static Optional<URI>
getRealProjectURI(Class<?> clz, String projectRootFolderName)
Determine the location of a project from a given class.-
Methods inherited from class tools.mdsd.library.standalone.initialization.impl.InitializationTaskWrapper
getDelegate, initializationWithPlatform, initilizationWithoutPlatform
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface tools.mdsd.library.standalone.initialization.InitializationTask
init, isPlatformRunning
-
-
-
-
Constructor Detail
-
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 Detail
-
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.
-
-