Class PersistenceUtils
java.lang.Object
net.ssehub.easy.producer.eclipse.persistency.eclipse.PersistenceUtils
Provides Eclipse-specific persistent utility methods.
This class mostly delegates to
PersistenceUtils.- Author:
- Holger Eichelberger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final voidcloseProject(org.eclipse.core.resources.IProject project) Closes a project, i.e., removes its configuration from the internal cache.static final net.ssehub.easy.producer.core.persistence.ConfigurationgetConfiguration(org.eclipse.core.resources.IProject project) Returns the (cached) configuration for the given project (in terms of aprojectFolder).static final org.eclipse.core.resources.IFoldergetLocationFolder(org.eclipse.core.resources.IProject project, net.ssehub.easy.producer.core.persistence.Configuration.PathKind kind) Returns the specified location folder for the givenproject.static final FilegetProjectLocation(org.eclipse.core.resources.IProject project) Returns the location of the givenprojectas a file.static final org.eclipse.core.runtime.IPathmakeWsPathAbsolute(org.eclipse.core.runtime.IPath path) Turns a workspace-relative path into an absolute path.
-
Constructor Details
-
PersistenceUtils
public PersistenceUtils()
-
-
Method Details
-
getProjectLocation
Returns the location of the givenprojectas a file.- Parameters:
project- the project to return the folder for- Returns:
- the project location
-
getLocationFolder
public static final org.eclipse.core.resources.IFolder getLocationFolder(org.eclipse.core.resources.IProject project, net.ssehub.easy.producer.core.persistence.Configuration.PathKind kind) Returns the specified location folder for the givenproject. This is a convenience method forConfiguration.getPath(PathKind, int).- Parameters:
project- the project to return the folder forkind- the path kind- Returns:
- the folder; note that the existence of this folder is not guaranteed
-
getConfiguration
public static final net.ssehub.easy.producer.core.persistence.Configuration getConfiguration(org.eclipse.core.resources.IProject project) Returns the (cached) configuration for the given project (in terms of aprojectFolder).- Parameters:
project- the project to return the folder for- Returns:
- the configuration of the project
-
closeProject
public static final void closeProject(org.eclipse.core.resources.IProject project) Closes a project, i.e., removes its configuration from the internal cache.- Parameters:
project- the project to return the folder for
-
makeWsPathAbsolute
public static final org.eclipse.core.runtime.IPath makeWsPathAbsolute(org.eclipse.core.runtime.IPath path) Turns a workspace-relative path into an absolute path.- Parameters:
path- the workspace-relative path- Returns:
- the absolute path (
pathif it is not located in the workspace)
-