Package org.eclipse.emf.ecp.ide.spi.util
Class WorkspaceUtil
- java.lang.Object
-
- org.eclipse.emf.ecp.ide.spi.util.WorkspaceUtil
-
public final class WorkspaceUtil extends java.lang.Object
Utility class containing common functionality for services using the workspace.- Since:
- 1.17
- Author:
- Lucas Koehler
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List<org.eclipse.emf.common.util.URI>
getURIsInWorkspace(java.lang.String fileExtension)
Get theURIs
of all files in the workspace that have the given file extension.static java.io.File
uriToFile(org.eclipse.emf.common.util.URI uri)
Converts an EMFURI
to a JavaFile
.
-
-
-
Method Detail
-
getURIsInWorkspace
public static java.util.List<org.eclipse.emf.common.util.URI> getURIsInWorkspace(java.lang.String fileExtension) throws org.eclipse.core.runtime.CoreException
Get theURIs
of all files in the workspace that have the given file extension.- Parameters:
fileExtension
- The file extension of the files to search for in the workspace.- Returns:
- The list of
URIs
- Throws:
org.eclipse.core.runtime.CoreException
- If something goes wrong while analyzing the workspace
-
uriToFile
public static java.io.File uriToFile(org.eclipse.emf.common.util.URI uri)
Converts an EMFURI
to a JavaFile
.- Parameters:
uri
- TheURI
to convert- Returns:
- The Java
File
-
-