Class AbstractProjectCreator
java.lang.Object
net.ssehub.easy.producer.eclipse.persistency.project_creation.AbstractProjectCreator
- Direct Known Subclasses:
DerivedProjectCreator,NewProjectCreator
Super class for creating new EASy projects.
- Author:
- El-Sharkawy
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate IEASyProjectConfigurator[]Configurators to configure the project during creation.private booleanprivate static final net.ssehub.easy.basics.logger.EASyLoggerFactory.EASyLoggerprivate ProductLineProjectprivate EclipsePersistencerprivate org.eclipse.core.resources.IProjectprivate String -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractProjectCreator(String projectName, boolean lazy, IEASyProjectConfigurator... configurators) Sole constructor for creating new EASy projects. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidConfigures the newly created project.protected abstract voidconfigureProject(org.eclipse.core.resources.IProject createdProject, IEASyProjectConfigurator configurator) Configures the newly created Eclipse project.(package private) abstract ProductLineProjectCreates the newProductLineProjectwith the specified parameters.private voidCreate the project related information, i.e., the PLP instance, possibly including the containing project.protected final voidCreates the (empty)ProductLineProject, which may needs further configuration.protected final ProductLineProjectReturns the newly createdProductLineProject.protected final booleanReturns whether the project should be created lazy.protected final voidSets persistence properties for the newly created project and refreshes the workspace/models.
-
Field Details
-
LOGGER
private static final net.ssehub.easy.basics.logger.EASyLoggerFactory.EASyLogger LOGGER -
newPLP
-
projectName
-
persistencer
-
project
private org.eclipse.core.resources.IProject project -
lazy
private boolean lazy -
configurators
Configurators to configure the project during creation. Maybenull.
-
-
Constructor Details
-
AbstractProjectCreator
protected AbstractProjectCreator(String projectName, boolean lazy, IEASyProjectConfigurator... configurators) Sole constructor for creating new EASy projects.- Parameters:
projectName- The name of the new project (should already be checked, whether the name is valid).lazy- iftrue, create only required parts, else assume that project does not exist beforeconfigurators- Optional list of configurators to configure the newly created project, maybenull. The configurators whill be applied in the ordering of the array.
-
-
Method Details
-
getCreatedProject
Returns the newly createdProductLineProject.- Returns:
- The newly created
ProductLineProjectornullif this method was called before the creation was finished.
-
isLazyCreation
protected final boolean isLazyCreation()Returns whether the project should be created lazy.- Returns:
trueif only required parts should be created, else assume that project does not exist before
-
createProject
protected final void createProject()Creates the (empty)ProductLineProject, which may needs further configuration. This is the first step while creating a derived or not derived project. This project will also be configured with the givenIEASyProjectConfigurators. -
configureProject
private void configureProject()Configures the newly created project. For instance, this may include to change the project to a Java project. Part of thecreateProject()method. -
configureProject
protected abstract void configureProject(org.eclipse.core.resources.IProject createdProject, IEASyProjectConfigurator configurator) Configures the newly created Eclipse project.- Parameters:
createdProject- The newly created EASy (Eclipse) project.configurator- The configurator to use for configuring the project.
-
createNewEASyProject
private void createNewEASyProject()Create the project related information, i.e., the PLP instance, possibly including the containing project. This project needs further configuration. Part of thecreateProject()method. -
setPersistenceProperties
protected final void setPersistenceProperties()Sets persistence properties for the newly created project and refreshes the workspace/models. -
createEASyProject
Creates the newProductLineProjectwith the specified parameters.- Returns:
- The newly created
ProductLineProject.
-