Class ProjectCreator
java.lang.Object
net.ssehub.easy.producer.eclipse.persistency.project_creation.ProjectCreator
Creates a new Project with the given parameters.
- Author:
- El-Sharkawy, Kapeluch, Nowatzki
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate static final net.ssehub.easy.basics.logger.EASyLoggerFactory.EASyLoggerprivate String -
Constructor Summary
ConstructorsConstructorDescriptionProjectCreator(String projectname) Default constructor for this class.ProjectCreator(String projectname, boolean lazy) Use this constructor in case, if you don't want to open a configuration window. -
Method Summary
Modifier and TypeMethodDescriptionderiveNewMember(String predecessor, IEASyProjectConfigurator... configurators) Creates a new productline member with all necessarily files and folders.newPLP(IEASyProjectConfigurator... configurators) Creates a new product line project with all necessarily files and folders.static booleanprojectExists(String projectname) Tests whether a given projectname already exists inside the workspace.
-
Field Details
-
LOGGER
private static final net.ssehub.easy.basics.logger.EASyLoggerFactory.EASyLogger LOGGER -
projectname
-
lazy
private boolean lazy
-
-
Constructor Details
-
ProjectCreator
public ProjectCreator(String projectname) throws ProjectAlreadyExistsException, InvalidProjectnameException Default constructor for this class.- Parameters:
projectname- The name of the new project- Throws:
ProjectAlreadyExistsException- If the project which should be created already exists.InvalidProjectnameException- If the projectname is not valid.
-
ProjectCreator
public ProjectCreator(String projectname, boolean lazy) throws ProjectAlreadyExistsException, InvalidProjectnameException Use this constructor in case, if you don't want to open a configuration window. This constructor is for automated testing.- Parameters:
projectname- The name of the new projectlazy- iftrue, create only required parts, else assume that project does not exist before- Throws:
ProjectAlreadyExistsException- If the project which should be created already exists.InvalidProjectnameException- If the project which should be created has a non-valid name.
-
-
Method Details
-
deriveNewMember
public ProductLineProject deriveNewMember(String predecessor, IEASyProjectConfigurator... configurators) Creates a new productline member with all necessarily files and folders. The new created project will be a successor of an existing project.- Parameters:
predecessor- On predecessor of the new projectconfigurators- Optional list of configurators to configure the newly created project, maybenull. The configurators will be applied in the ordering of the array.- Returns:
- The newly created product line project
- See Also:
-
newPLP
Creates a new product line project with all necessarily files and folders.- Parameters:
configurators- Optional list of configurators to configure the newly created project, maybenull. The configurators will be applied in the ordering of the array.- Returns:
- The newly created product line project
- See Also:
-
projectExists
Tests whether a given projectname already exists inside the workspace.- Parameters:
projectname- A new projectname to test- Returns:
- true if the project already exists, otherwise false
-