Desktop-based IDEs often assume an abundance of resources: plenty of RAM, multiple cores, a large screen, and so on. And they generally ship with features you may never need, including support for languages you don’t use, inspections for frameworks you may never touch, and panels and tool windows you might open once a year.
On a machine with 32GB of RAM, a large monitor, and a high-capacity disk drive, you can just ignore what you don’t need, but resources are scarcer on a phone. Every toolbar button consumes limited screen space, and every background service shares limited memory with everything else running on the device. A phone-based IDE needs a lean core and a way for each developer to add exactly (and only!) what they need on top of it.
Code on the Go’s plugin system empowers developers to customize the interface to meet their unique requirements and preferences. Plugins in Code on the Go can add any feature and function to the IDE, including (but not limited to):
- Adding tabs to the bottom sheet output panels
- Registering single-tap commands that apply a series of complex actions
- Intercepting file opens with custom viewers
- Injecting actions into the toolbar and sidebar
- Contributing documentation
- Shipping project templates
For millions of people around the world, a mobile phone is their only computing device, and internet access may be limited or unreliable. Plugins empower developers to shape the environment around their unique requirements and constraints and transform a mass-market mobile phone into a customizable development machine.
How it works under the hood
Plugins ship in .cgp format with a manifest file. When you install one through the plugin manager, the system validates the signature, extracts the manifest, checks declared permissions against what the plugin is requesting, creates an isolated class loader, extracts any bundled native libraries, builds a full Android Context with the plugin’s own resources and theme support, and calls initialize() with a permission-gated service registry.
Because screen space and resources are so limited on a phone, Code on the Go supports disabling a plugin as well as fully uninstalling it. If you don’t need to use a plugin at the current development stage, you can deactivate it: it’s removed from the UI but not deleted from the disk, and you can re-enable it any time you want to use it again. When you uninstall, the plugin is completely removed, and you’ll need to reinstall the .cgp file if you want to use it again.
How Code on the Go plugins address security
On a desktop IDE, a poorly written plugin may be an annoyance. But on a phone, a memory leak that takes hours to affect laptop performance will become noticeable within minutes. To address this issue, Code on the Go’s plugin system was designed with isolation as a core requirement.
DexClassLoader, so Plugin A cannot see Plugin B’s classes, and no plugin can access IDE internals without explicit permissions declared upfront in a manifest. A security manager blocks access to dangerous APIs (such as when the plugin holds the matching permission). Command execution is capped at three concurrent processes per plugin, with configurable timeouts. When you uninstall a plugin, everything associated with it is removed, including native libraries, class loaders, added templates and documentation, and running commands.
Current Limitations
Runtime, ProcessBuilder, raw sockets, and reflection) unless the plugin holds the matching permission. Command execution is capped at three concurrent processes per plugin, with configurable timeouts. When you uninstall a plugin, everything associated with it is removed, including native libraries, class loaders, added templates and documentation, and running commands. Please try
The best plugin ecosystems grow because developers invent and build capabilities that no single team could ever come up with alone. To try out the current suite of plugins, enable experimental features and install any or all of the current suite.
If you want to build a new plugin or tailor an existing one, the developer documentation is available here. Please plan to share what you build with the community—if you find it useful, chances are that others will too. And, as always, happy coding!