Class ResourceUtils
java.lang.Object
org.enterprisedomain.classmaker.util.ResourceUtils
-
Field Summary
Modifier and TypeFieldDescriptionstatic final org.eclipse.core.runtime.IPath
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String[]
addElement
(String[] elements, String element) static void
addProjectNature
(org.eclipse.core.resources.IProject project, String natureId) static void
addToBuildSpec
(org.eclipse.core.resources.IProject project, String builderID) static void
cleanupDir
(org.eclipse.core.resources.IProject project) static void
cleanupDir
(org.eclipse.core.resources.IProject project, String folderPath) static void
cleanupDir
(org.eclipse.core.resources.IProject project, String folderPath, String[] excluding) static void
copyFile
(org.eclipse.emf.common.util.URI sourceURI, org.eclipse.core.runtime.IPath targetPath) static void
createProject
(org.eclipse.core.resources.IProject project, String nature, org.eclipse.core.runtime.IProgressMonitor monitor) static void
static org.eclipse.core.resources.ICommand
getBuildSpec
(org.eclipse.core.resources.IProjectDescription description, String builderId) static String
getEcoreFileName
(String name) static String
static org.eclipse.core.runtime.IPath
getEditorTargetResourcePath
(org.eclipse.core.resources.IProject project, State state) static org.eclipse.core.runtime.IPath
getEditTargetResourcePath
(org.eclipse.core.resources.IProject project, State state) static org.eclipse.core.runtime.IPath
getExportDestination
(org.eclipse.core.resources.IProject project) static String
getFileName
(String name) static String
static String
Returns the name of the folder within project, where the model resource is located.static org.eclipse.core.runtime.IPath
getModelTransformationPath
(org.eclipse.core.resources.IProject project, org.eclipse.emf.common.util.URI transformationURI) static org.eclipse.core.resources.IProject
getProject
(String projectName) static String
static org.eclipse.core.runtime.IPath
getTargetResourcePath
(org.eclipse.core.resources.IProject project, State state) static org.eclipse.core.runtime.IPath
static boolean
isProjectExists
(String projectName) static String
parseProjectName
(org.eclipse.emf.common.util.URI modelURI) static String[]
removeElement
(String[] elements, String element) static void
removeFromBuildSpec
(org.eclipse.core.resources.IProject project, String builderID) static void
removeProjectNature
(org.eclipse.core.resources.IProject project, String natureId) static void
restoreAutoBuilding
(org.eclipse.core.resources.IWorkspace workspace) static void
saveAutoBuilding
(org.eclipse.core.resources.IWorkspace workspace) static void
setAutoBuilding
(org.eclipse.core.resources.IWorkspace workspace, boolean value) static void
writeFile
(org.eclipse.core.runtime.IPath location, CharSequence contents)
-
Field Details
-
PROJECT_DELETE_MASK
-
WORKSPACE_RESOURCE_PATH
public static final org.eclipse.core.runtime.IPath WORKSPACE_RESOURCE_PATH
-
-
Constructor Details
-
ResourceUtils
public ResourceUtils()
-
-
Method Details
-
getModelTransformationPath
public static org.eclipse.core.runtime.IPath getModelTransformationPath(org.eclipse.core.resources.IProject project, org.eclipse.emf.common.util.URI transformationURI) -
getExportDestination
public static org.eclipse.core.runtime.IPath getExportDestination(org.eclipse.core.resources.IProject project) -
getTargetResourcePath
public static org.eclipse.core.runtime.IPath getTargetResourcePath(org.eclipse.core.resources.IProject project, State state) -
getEditTargetResourcePath
public static org.eclipse.core.runtime.IPath getEditTargetResourcePath(org.eclipse.core.resources.IProject project, State state) -
getEditorTargetResourcePath
public static org.eclipse.core.runtime.IPath getEditorTargetResourcePath(org.eclipse.core.resources.IProject project, State state) -
getModelFolderName
Returns the name of the folder within project, where the model resource is located.- Returns:
-
getTargetFolderName
-
getModelFileExt
-
getEcoreModelFileExt
-
getFileName
-
getEcoreFileName
-
parseProjectName
-
getWorkspaceLocation
public static org.eclipse.core.runtime.IPath getWorkspaceLocation() -
getProject
-
isProjectExists
-
addElement
-
removeElement
-
addProjectNature
public static void addProjectNature(org.eclipse.core.resources.IProject project, String natureId) throws org.eclipse.core.runtime.CoreException - Throws:
org.eclipse.core.runtime.CoreException
-
removeProjectNature
public static void removeProjectNature(org.eclipse.core.resources.IProject project, String natureId) throws org.eclipse.core.runtime.CoreException - Throws:
org.eclipse.core.runtime.CoreException
-
getBuildSpec
public static org.eclipse.core.resources.ICommand getBuildSpec(org.eclipse.core.resources.IProjectDescription description, String builderId) -
addToBuildSpec
public static void addToBuildSpec(org.eclipse.core.resources.IProject project, String builderID) throws org.eclipse.core.runtime.CoreException - Throws:
org.eclipse.core.runtime.CoreException
-
removeFromBuildSpec
public static void removeFromBuildSpec(org.eclipse.core.resources.IProject project, String builderID) throws org.eclipse.core.runtime.CoreException - Throws:
org.eclipse.core.runtime.CoreException
-
createProject
public static void createProject(org.eclipse.core.resources.IProject project, String nature, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException - Throws:
org.eclipse.core.runtime.CoreException
-
copyFile
public static void copyFile(org.eclipse.emf.common.util.URI sourceURI, org.eclipse.core.runtime.IPath targetPath) throws org.eclipse.core.runtime.CoreException - Throws:
org.eclipse.core.runtime.CoreException
-
setAutoBuilding
public static void setAutoBuilding(org.eclipse.core.resources.IWorkspace workspace, boolean value) throws org.eclipse.core.runtime.CoreException - Throws:
org.eclipse.core.runtime.CoreException
-
saveAutoBuilding
public static void saveAutoBuilding(org.eclipse.core.resources.IWorkspace workspace) -
restoreAutoBuilding
public static void restoreAutoBuilding(org.eclipse.core.resources.IWorkspace workspace) throws org.eclipse.core.runtime.CoreException - Throws:
org.eclipse.core.runtime.CoreException
-
cleanupDir
public static void cleanupDir(org.eclipse.core.resources.IProject project) throws org.eclipse.core.runtime.CoreException - Throws:
org.eclipse.core.runtime.CoreException
-
cleanupDir
public static void cleanupDir(org.eclipse.core.resources.IProject project, String folderPath) throws org.eclipse.core.runtime.CoreException - Throws:
org.eclipse.core.runtime.CoreException
-
cleanupDir
public static void cleanupDir(org.eclipse.core.resources.IProject project, String folderPath, String[] excluding) throws org.eclipse.core.runtime.CoreException - Throws:
org.eclipse.core.runtime.CoreException
-
delete
-
writeFile
public static void writeFile(org.eclipse.core.runtime.IPath location, CharSequence contents) throws org.eclipse.core.runtime.CoreException - Throws:
org.eclipse.core.runtime.CoreException
-