Class StandaloneInitializerBuilder
java.lang.Object
tools.mdsd.library.standalone.initialization.StandaloneInitializerBuilder
Builder of
StandaloneInitializer instances.-
Method Summary
Modifier and TypeMethodDescriptionAdd a custom initialization task to the builder.build()Builds aStandaloneInitializerbased on the configuration done on the builder.static StandaloneInitializerBuilderbuilder()Create a new instance of a builder.registerMetaModel(String projectName, String relativePath) Register a meta model by a given project name and a relative path within this project.registerProjectURI(Class<?> classOfProject, String projectName) Register platform URIs for a project to a location determined by a class of this project.registerProjectURI(Class<?> classOfProject, String projectName, String rootFolderName) Register platform URIs for a project to a location determined by a class of this project.useEcoreClasspathDetection(boolean use) Register meta models and other ecore extensions by parsing the classpath.
-
Method Details
-
builder
Create a new instance of a builder.- Returns:
- A new builder.
-
useEcoreClasspathDetection
Register meta models and other ecore extensions by parsing the classpath. The default is using it.- Parameters:
use- True for using it, false otherwise.- Returns:
- Modified builder instance.
-
registerProjectURI
Register platform URIs for a project to a location determined by a class of this project. This only works if the project name is equal to the name of the project root folder. If this is not the case, useregisterProjectURI(Class, String, String). Please note that the path of a fragment bundle project is usually the path of the host bundle after compilation.- Parameters:
classOfProject- A class of the project to register.projectName- The name of the project to register.- Returns:
- Modified builder instance.
-
registerProjectURI
public StandaloneInitializerBuilder registerProjectURI(Class<?> classOfProject, String projectName, String rootFolderName) Register platform URIs for a project to a location determined by a class of this project.- Parameters:
classOfProject- A class of the project to register.projectName- The name of the project to register.rootFolderName- The name of the project's root folder.- Returns:
- Modified builder instance.
-
registerMetaModel
Register a meta model by a given project name and a relative path within this project. Callers have to ensure that- the given project is registered, e.g. by calling
registerProjectURI(Class, String) - either
useEcoreClasspathDetection(boolean)is used or all prerequisites for loading the meta model resource are fulfilled
- Parameters:
projectName- The name of the project.relativePath- The path to the meta model file relative to the project without leading slash.- Returns:
- Modified builder instance.
- the given project is registered, e.g. by calling
-
addCustomTask
Add a custom initialization task to the builder.- Parameters:
task- A custom task to execute during initialization.- Returns:
- Modified builder instance.
-
build
Builds aStandaloneInitializerbased on the configuration done on the builder.- Returns:
- An initializer.
-