Class PathEnvironmentFactory
- java.lang.Object
-
- net.ssehub.easy.producer.eclipse.persistency.eclipse.PathEnvironmentFactory
-
public class PathEnvironmentFactory extends java.lang.ObjectCreates path environments in a generic way considering information from projects such as relevant classpaths.- Author:
- Holger Eichelberger
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfacePathEnvironmentFactory.IProjectHandlerHandles a certain type of project.
-
Field Summary
Fields Modifier and Type Field Description private static java.util.List<PathEnvironmentFactory.IProjectHandler>handlers
-
Constructor Summary
Constructors Modifier Constructor Description privatePathEnvironmentFactory()Prevents this class from being instantiated from outside.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PathEnvironmentcreatePathEnvironment(org.eclipse.core.resources.IProject project)Creates a new path environment and takes project specific paths such as classpaths into account.static voidregisterHandler(PathEnvironmentFactory.IProjectHandler handler)Registers a project handler.static voidunregisterHandler(PathEnvironmentFactory.IProjectHandler handler)Unregisters a project handler.static voidupdatePathEnvironment(PathEnvironment pathEnv, org.eclipse.core.resources.IProject project)Updates a given path environment with data fromproject.
-
-
-
Field Detail
-
handlers
private static java.util.List<PathEnvironmentFactory.IProjectHandler> handlers
-
-
Method Detail
-
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 PathEnvironment createPathEnvironment(org.eclipse.core.resources.IProject project)
Creates a new path environment and takes project specific paths such as classpaths into account. CallsupdatePathEnvironment(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 fromproject. This method takes the registered instances ofPathEnvironmentFactory.IProjectHandlerinto account.- Parameters:
pathEnv- the path environment to updateproject- the project to be considered
-
-