Class AbstractProjectCreator

  • Direct Known Subclasses:
    DerivedProjectCreator, NewProjectCreator

    abstract class AbstractProjectCreator
    extends java.lang.Object
    Super class for creating new EASy projects.
    Author:
    El-Sharkawy
    • Constructor Detail

      • AbstractProjectCreator

        protected AbstractProjectCreator​(java.lang.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 Detail

      • 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.