forked from microsoft/vscode
-
Notifications
You must be signed in to change notification settings - Fork 0
Code Organization
Benjamin Pasero edited this page Nov 25, 2015
·
17 revisions
Code consists a layered and modular core
that can be extended using extensions. Extensions are run in a separate process refered to as the
extension host.
Extensions are implemented using extension API that is described in the extension documentation.
The core
is partitioned into the following layers:
-
base
: Provides general utilities and user interface building blocks -
platform
: Defines service injection support and the base services for Code -
editor
: The "Monaco" editor is available as a separate downloadable component -
languages
: For historical reasons, not all languages are implemented as extensions (yet) - as Code evolves we will migrate more languages to towards extensions -
workbench
: Hosts the "Monaco" editor and provides the framework for "viewlets" like the Explorer, Status Bar, or Menu Bar, leveraging Electron to implement the Code desktop application.
The core
of Code is fully implemented in TypeScript. Inside each layer the code is organized by the target runtime environment. This ensures that only the runtime specific APIs are used. In the code we distinguish between the following target environments:
-
common
: Source code that only requires basic JavaScript APIs and run in all the other target environments -
browser
: Source code that requires thebrowser
APIs like access to the DOM- inherits:
common
- inherits:
-
node
: Source code that requiresnodejs
APIs- inherits:
common
- inherits:
-
electron-browser
: Source code that requires the Electron renderer-process APIs- inherits:
common
,browser
,node
- inherits:
-
electron-main
: Source code that requires the Electron main-process APIs- inherits:
common
,node
- inherits:
Project Management
- Roadmap
- Iteration Plans
- Development Process
- Issue Tracking
- Release Process
- Running the Endgame
- Related Projects
Contributing
- How to Contribute
- Submitting Bugs and Suggestions
- Code Organization
- Coding Guidelines
- Smoke Test
- Contributor License Agreement
- Requested Extensions
Documentation