Class PathManager


  • public final class PathManager
    extends Object
    Responsible for different predefined paths in the distribution layout IMPORTANT: this class is not for MPS startup, rather to figure out relevant values when there's MPS instance running.
    • Method Detail

      • getHomePath

        public static String getHomePath()
        The thing is that we have two main #getHomePath implementations: here and in IDEA's PathManager#getHomePath. These almost always should return the same value, however the method here answers to the question where the MPS classes are located, while the IDEA's method answers where the IDEA classes are located. Also this paths are configurable from the outside by the properties. In MPS IDE we obviously have these two pointing to the same location, however in MPS IDEA plugin the one below point to the root of the mps-core plugin, while the IDEA's method returns the location of the IDEA distribution.
        Returns:
        the MPS home path
        See Also:
        getPlatformLibPath()
      • isFromSources

        public static boolean isFromSources()
        Defines whether we are starting from sources not from distribution
      • getIdeaPath

        public static String getIdeaPath()
      • getLibExtPath

        public static String getLibExtPath()
      • getPlatformLibPath

        public static String getPlatformLibPath()
        Returns:
        /lib location, where IDEA platform jars reside. May be the same as getLibPath()
      • getHomePaths

        public static String[] getHomePaths()
      • getLibPath

        public static String getLibPath()
        Returns:
        /lib location, where mps own jars reside. May be the same as getPlatformLibPath()
      • getLanguagesPath

        public static String getLanguagesPath()
      • getWorkbenchPath

        public static String getWorkbenchPath()
      • getCorePath

        public static String getCorePath()
      • getEditorPath

        public static String getEditorPath()
      • getResourceRoot

        public static String getResourceRoot​(Class context,
                                             String path)
        Attempts to detect classpath entry which contains given resource
      • getPreInstalledPluginsPath

        public static String getPreInstalledPluginsPath()
      • getUserDir

        public static String getUserDir()