Child pages
  • External system integration
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »


This page provides high-level overview of External System sub-system.

Table of contents


There are multiple project management systems (maven, gradle, sbt etc) and it's good to support them at the ide. Luckily, they all provide a similar set of facilities from the integration point of view:

  • build ide project from external system config (pom.xml, build.gradle etc);
  • provide a list of available tasks;
  • allow to execute particular task;
  • ...
    That means that we can separate external system-specific logic and general ide processing. 'External system' sub-system provides simple api for wrapping external system and extensible ide-specific processing logic.

Project management

Project data domain

External system wrapper is required to be able to build project info on the basis of the given external system config. That information is built using in terms of DataNode, Key and ProjectEntityData.

Here DataNode class is just a holder for the target data (data type is defined by the Key). Multiple DataNode objects might be organized in directed graph where every edge identifies parent-child relation.

For example, simple one-module project might look as below:

The ide provides a set of built-in Key_s and _ProjectEntityData_s but any external system integration or third-party plugin developer might enhance project data by defining her own _Key and ProjectEntityData and storing them at a child of appropriate DataNode.

Managing project data

We need to process project data is built on external system config basis. Here comes ProjectDataService. It is a strategy which knows how to manage particular ProjectEntityData. For example, when we want to import a project from external model, we can start by the top level DataNode which references project info and then import its data using corresponding service.

Custom services can be defined via 'externalProjectDataService' extension.

The good thing is that we can separate project parsing and management here. That means that a set of DataNode, Key and ProjectDataServices can be introduced for particular technology and then every external system integration can build corresponding data if necessary using it.

Importing from external model

IntelliJ platform provides standard api for that. Namely, ProjectImportBuilder and ProjectImportProvider. There are two classes built on template method pattern - AbstractExternalProjectImportBuilder and AbstractExternalProjectImportProvider. They might be sub-classes and that concrete implementations should be registered at IoC descriptor (plugin.xml).

Here is an example from the gradle integration plugin:

  • No labels