Class EnvironmentBase

  • All Implemented Interfaces:
    Environment
    Direct Known Subclasses:
    MpsEnvironment

    public abstract class EnvironmentBase
    extends Object
    implements Environment
    Base class for all environments, represents a caching environment. The contract: only one environment must be alive, it is being stored in the special EnvironmentContainer class.
    • Method Detail

      • initializeLog4j

        public static void initializeLog4j()
      • init

        protected void init​(Platform mpsPlatform)
      • getRootClassLoader

        @Nullable
        protected final ClassLoader getRootClassLoader()
        Root class loader: 1. As a root class loader for libraries in LibraryInitializer 2. As a root class loader for dumb idea plugin facet
      • getOpenedProject

        @Nullable
        public final Project getOpenedProject​(@NotNull
                                              File projectFile)
        Contract: Returns null if there is no opened project with such File
      • closeProject

        public void closeProject​(@NotNull
                                 Project project)
        Description copied from interface: Environment
        Discards previously opened project. Environment does its best to close the project but may choose to ignore request in certain scenarions (like in-process test execution, when closing an active project may affect user experience)
        Specified by:
        closeProject in interface Environment
        Parameters:
        project - an instance obtained from Environment.openProject(java.io.File)
      • doDispose

        protected abstract void doDispose()
      • dispose

        public final void dispose()
        Description copied from interface: Environment
        disposes the environment for real, does not consider ref counts
        Specified by:
        dispose in interface Environment
      • checkInitialized

        protected final void checkInitialized()