Class PathEnvironmentFactory

java.lang.Object
net.ssehub.easy.producer.eclipse.persistency.eclipse.PathEnvironmentFactory

public class PathEnvironmentFactory extends Object
Creates path environments in a generic way considering information from projects such as relevant classpaths.
Author:
Holger Eichelberger
  • Field Details

  • Constructor Details

    • PathEnvironmentFactory

      private PathEnvironmentFactory()
      Prevents this class from being instantiated from outside. [utility class/factory class]
  • Method Details

    • registerHandler

      public static void registerHandler(PathEnvironmentFactory.IProjectHandler handler)
      Registers a project handler.
      Parameters:
      handler - the handler to register
    • unregisterHandler

      public static void unregisterHandler(PathEnvironmentFactory.IProjectHandler handler)
      Unregisters a project handler.
      Parameters:
      handler - the handler to unregister
    • createPathEnvironment

      public static net.ssehub.easy.producer.core.persistence.datatypes.PathEnvironment createPathEnvironment(org.eclipse.core.resources.IProject project)
      Creates a new path environment and takes project specific paths such as classpaths into account. Calls updatePathEnvironment(PathEnvironment, IProject) on the new instance.
      Parameters:
      project - the project to build the path environment for (may be null)
      Returns:
      the path environment
    • updatePathEnvironment

      public static void updatePathEnvironment(net.ssehub.easy.producer.core.persistence.datatypes.PathEnvironment pathEnv, org.eclipse.core.resources.IProject project)
      Updates a given path environment with data from project. This method takes the registered instances of PathEnvironmentFactory.IProjectHandler into account.
      Parameters:
      pathEnv - the path environment to update
      project - the project to be considered