Class PersistenceUtils
- java.lang.Object
-
- net.ssehub.easy.producer.eclipse.persistency.eclipse.PersistenceUtils
-
public class PersistenceUtils extends java.lang.ObjectProvides Eclipse-specific persistent utility methods. This class mostly delegates toPersistenceUtils.- Author:
- Holger Eichelberger
-
-
Constructor Summary
Constructors Constructor Description PersistenceUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcloseProject(org.eclipse.core.resources.IProject project)Closes a project, i.e., removes its configuration from the internal cache.static ConfigurationgetConfiguration(org.eclipse.core.resources.IProject project)Returns the (cached) configuration for the given project (in terms of aprojectFolder).static org.eclipse.core.resources.IFoldergetLocationFolder(org.eclipse.core.resources.IProject project, Configuration.PathKind kind)Returns the specified location folder for the givenproject.static java.io.FilegetProjectLocation(org.eclipse.core.resources.IProject project)Returns the location of the givenprojectas a file.static org.eclipse.core.runtime.IPathmakeWsPathAbsolute(org.eclipse.core.runtime.IPath path)Turns a workspace-relative path into an absolute path.
-
-
-
Method Detail
-
getProjectLocation
public static final java.io.File getProjectLocation(org.eclipse.core.resources.IProject project)
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, Configuration.PathKind kind)Returns the specified location folder for the givenproject. This is a convenience method forConfiguration#getPath(PathKind).- 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 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)
-
-