Class ResourceUtils
java.lang.Object
org.enterprisedomain.classmaker.util.ResourceUtils
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.eclipse.core.runtime.IPath -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String[]addElement(String[] elements, String element) static voidaddProjectNature(org.eclipse.core.resources.IProject project, String natureId) static voidaddToBuildSpec(org.eclipse.core.resources.IProject project, String builderID) static voidcleanupDir(org.eclipse.core.resources.IProject project) static voidcleanupDir(org.eclipse.core.resources.IProject project, String folderPath) static voidcleanupDir(org.eclipse.core.resources.IProject project, String folderPath, String[] excluding) static voidcopyFile(org.eclipse.emf.common.util.URI sourceURI, org.eclipse.core.runtime.IPath targetPath) static voidcreateProject(org.eclipse.core.resources.IProject project, String nature, org.eclipse.core.runtime.IProgressMonitor monitor) static voidstatic org.eclipse.core.resources.ICommandgetBuildSpec(org.eclipse.core.resources.IProjectDescription description, String builderId) static StringgetEcoreFileName(String name) static Stringstatic org.eclipse.core.runtime.IPathgetEditorTargetResourcePath(org.eclipse.core.resources.IProject project, State state) static org.eclipse.core.runtime.IPathgetEditTargetResourcePath(org.eclipse.core.resources.IProject project, State state) static org.eclipse.core.runtime.IPathgetExportDestination(org.eclipse.core.resources.IProject project) static StringgetFileName(String name) static Stringstatic StringReturns the name of the folder within project, where the model resource is located.static org.eclipse.core.runtime.IPathgetModelTransformationPath(org.eclipse.core.resources.IProject project, org.eclipse.emf.common.util.URI transformationURI) static org.eclipse.core.resources.IProjectgetProject(String projectName) static Stringstatic org.eclipse.core.runtime.IPathgetTargetResourcePath(org.eclipse.core.resources.IProject project, State state) static org.eclipse.core.runtime.IPathstatic booleanisProjectExists(String projectName) static StringparseProjectName(org.eclipse.emf.common.util.URI modelURI) static String[]removeElement(String[] elements, String element) static voidremoveFromBuildSpec(org.eclipse.core.resources.IProject project, String builderID) static voidremoveProjectNature(org.eclipse.core.resources.IProject project, String natureId) static voidrestoreAutoBuilding(org.eclipse.core.resources.IWorkspace workspace) static voidsaveAutoBuilding(org.eclipse.core.resources.IWorkspace workspace) static voidsetAutoBuilding(org.eclipse.core.resources.IWorkspace workspace, boolean value) static voidwriteFile(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
-