Frameworks
The following tutorial shows how to support a custom framework type for a project and make this framework type embedded in a project wizard as a UI component. The examples in this tutorial rely heavily on the framework_basics code sample.
Creating a New Framework
In oder to make a custom framework available and configurable for a project the FrameworkTypeEx
class needs to be extended, in this example to make the DemoFramework class.
Registering Framework
The newly created framework class should be registered as an extension point by adding com.intellij.framework.type
extension in plugin.xml
configuration file:
Setting up Mandatory Attributes
The framework component should have a unique name passed as a string literal to the constructor. It is best if this is the FQN name of the class:
The Presentable name and icon define the appearance of visual components related to the framework:
Creating Provider for Enabling Framework Support
To make the framework set up available while executing the steps to create a project, the DemoFramework.createProvider()
method must be implemented to return an object of type FrameworkSupportInModuleConfigurable
, which adds the framework to a module. In this example the framework is added to any ModuleType
without checking, which is usually not the case.
Compile and Run the Plugin
See Code Samples on how to set up and run the plugin.
Extra option for configuring the newly created Demo custom framework should be available in the Project Wizard: