Class 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 the URIs 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 EMF URI to a Java File.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 the URIs 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 EMF URI to a Java File.
        Parameters:
        uri - The URI to convert
        Returns:
        The Java File