The CoreApplicationEnvironment construction registers various required application services and provides access to the instances of each service for additional configurations.
Important fields in the CoreApplicationEnvironment:
myLocalFileSystem
myJarFileSystem
myJrtFileSystem
myParentDisposable
In the extended CoreApplicationEnvironment register the appropriate file types and parser definitions:
registerFileType(PythonFileType.INSTANCE, "py");
registerParserDefinition(PythonLanguage.INSTANCE, new PythonParserDefinition());
// TODO: add pyi support.
// registerFileType(PyiFileType.INSTANCE, "pyi");
// registerParserDefinition(PyiLanguageDialect.getInstance(), new PyiParserDefinition());
The CoreApplicationEnvironment is used to create the CoreProjectEnvironment. The CoreProjectEnvironment
will automatically register various services for the project.
An instance of the CoreProjectEnvironment allows the project and application environment to be configured before parsing. Each service necessary for type attribution to resolve must be registered through the application environment, project, or extensions.
The CoreApplicationEnvironment construction registers various required application services and provides access to the instances of each service for additional configurations.
Important fields in the
CoreApplicationEnvironment
:In the extended
CoreApplicationEnvironment
register the appropriate file types and parser definitions:The
CoreApplicationEnvironment
is used to create the CoreProjectEnvironment. TheCoreProjectEnvironment
will automatically register various services for the project.An instance of the
CoreProjectEnvironment
allows the project and application environment to be configured before parsing. Each service necessary for type attribution to resolve must be registered through the application environment, project, or extensions.