Class ProjectCommands

java.lang.Object
net.ssehub.easy.standalone.cmd.ProjectCommands

public class ProjectCommands extends Object
Command line commands on project level.
Before calling any of the methods in this class, EASy must be loaded via calling LowlevelCommands.startEASy().
Author:
Holger Eichelberger
  • Field Details

  • Constructor Details

    • ProjectCommands

      public ProjectCommands()
  • Method Details

    • toggleEasyNature

      public static void toggleEasyNature(File project, String... classpath) throws IOException, IllegalArgumentException
      Toggles the EASy nature on a folder representing a project. This method may initially update product line dependencies via Contributions.updateDependencies(File, String...).
      Parameters:
      project - the folder representing a project
      classpath - the classpath of the project (needed in case of importing product line models, may be null or empty)
      Throws:
      IOException - in case of writing the configuration file causes an I/O problem
      IllegalArgumentException - in case that the given folders are invalid
    • updateDependencies

      public static void updateDependencies(File project, String... classpath) throws IOException
      Update product line dependencies via Contributions.updateDependencies(File, String...).
      Parameters:
      project - the folder representing a project
      classpath - the classpath of the project (needed in case of importing product line models, may be null or empty)
      Throws:
      IOException - in case of writing the configuration file causes an I/O problem
      IllegalArgumentException - in case that the given folders are invalid
    • checkFolder

      private static final void checkFolder(File file, String name) throws IllegalArgumentException
      Checks a folder for existence and folder nature.
      Parameters:
      file - the file to be checked
      name - the parameter name (for formatting the exception)
      Throws:
      IllegalArgumentException - in case that the given file is not a folder
    • setConfigLocation

      public static void setConfigLocation(File project, File ivmlFolder, File vilFolder) throws IOException, IllegalArgumentException
      Defines the configuration locations. Uses the given VIL folder also for VTL.
      Parameters:
      project - the folder representing a project
      ivmlFolder - the IVML models
      vilFolder - the VIL models
      Throws:
      IOException - in case of writing the configuration file causes an I/O problem
      IllegalArgumentException - in case that at least one of the given folders is invalid
      See Also:
    • setConfigLocation

      public static void setConfigLocation(File project, File ivmlFolder, File vilFolder, File vtlFolder) throws IOException, IllegalArgumentException
      Defines the configuration locations.
      Parameters:
      project - the folder representing a project
      ivmlFolder - the IVML models
      vilFolder - the VIL models
      vtlFolder - the VTL models
      Throws:
      IOException - in case of writing the configuration file causes an I/O problem
      IllegalArgumentException - in case that at least one of the given folders is invalid