Class PathEnvironmentFactory


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

      • PathEnvironmentFactory

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

      • createPathEnvironment

        public static 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
        Returns:
        the path environment
      • updatePathEnvironment

        public static void updatePathEnvironment​(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