Package jetbrains.mps.util
Class PathManager
- java.lang.Object
 - 
- jetbrains.mps.util.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. 
- 
- 
Field Summary
Fields Modifier and Type Field Description static StringDOT_JARstatic StringJARstatic FilenameFilterJAR_FILE_FILTER 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Collection<String>getBootstrapPaths()static StringgetCorePath()static StringgetEditorPath()static StringgetHomePath()The thing is that we have two main #getHomePath implementations: here and in IDEA's PathManager#getHomePath.static String[]getHomePaths()static StringgetIdeaPath()static StringgetLanguagesPath()static StringgetLibExtPath()static StringgetLibPath()static StringgetPlatformLibPath()static StringgetPreInstalledPluginsPath()static StringgetResourceRoot(Class context, String path)Attempts to detect classpath entry which contains given resourcestatic StringgetUserDir()static StringgetWorkbenchPath()static booleanisFromSources()Defines whether we are starting from sources not from distribution 
 - 
 
- 
- 
Field Detail
- 
JAR
public static final String JAR
- See Also:
 - Constant Field Values
 
 
- 
DOT_JAR
public static final String DOT_JAR
- See Also:
 - Constant Field Values
 
 
- 
JAR_FILE_FILTER
public static final FilenameFilter JAR_FILE_FILTER
 
 - 
 
- 
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()
 
- 
getBootstrapPaths
public static Collection<String> getBootstrapPaths()
 
- 
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()
 
 - 
 
 -