java.lang.Object
net.ssehub.easy.producer.eclipse.persistency.project_creation.AbstractProjectCreator
Direct Known Subclasses:
DerivedProjectCreator, NewProjectCreator

abstract class AbstractProjectCreator extends Object
Super class for creating new EASy projects.
Author:
El-Sharkawy
  • Field Details

    • LOGGER

      private static final net.ssehub.easy.basics.logger.EASyLoggerFactory.EASyLogger LOGGER
    • newPLP

      private ProductLineProject newPLP
    • projectName

      private String projectName
    • persistencer

      private EclipsePersistencer persistencer
    • project

      private org.eclipse.core.resources.IProject project
    • lazy

      private boolean lazy
    • configurators

      private IEASyProjectConfigurator[] configurators
      Configurators to configure the project during creation. Maybe null.
  • 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 - if true, create only required parts, else assume that project does not exist before
      configurators - Optional list of configurators to configure the newly created project, maybe null. The configurators whill be applied in the ordering of the array.
  • Method Details

    • getCreatedProject

      protected final ProductLineProject getCreatedProject()
      Returns the newly created ProductLineProject.
      Returns:
      The newly created ProductLineProject or null if this method was called before the creation was finished.
    • isLazyCreation

      protected final boolean isLazyCreation()
      Returns whether the project should be created lazy.
      Returns:
      true if 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 given IEASyProjectConfigurators.
    • configureProject

      private void configureProject()
      Configures the newly created project. For instance, this may include to change the project to a Java project. Part of the createProject() 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 the createProject() method.
    • setPersistenceProperties

      protected final void setPersistenceProperties()
      Sets persistence properties for the newly created project and refreshes the workspace/models.
    • createEASyProject

      abstract ProductLineProject createEASyProject()
      Creates the new ProductLineProject with the specified parameters.
      Returns:
      The newly created ProductLineProject.