- Using Spring-API
- Main concepts
- How do I...
- Spring Model
- XML Configuration
- Code Configuration
- IDE features
To develop plugins integrating with Spring-API you will need to use IntelliJ IDEA Ultimate Edition version 13.1 (or higher) (currently available as EAP version).
Setting up IntelliJ Platform SDK
Please (re-)create a IntelliJ Platform SDK to include all minimum required files.
Alternatively, follow these steps to modify existing SDK:
- add to IntelliJ Platform SDK classpath (not to your plugin module's dependencies)
- add to IntelliJ Platform SDK sourcepath
If you use other Spring functionality (e.g. Spring EL) in your plugin, make sure to add all required JARs to your IntelliJ Platform SDK classpath to make your plugin's tests work.
<depends>com.intellij.spring</depends> to your
plugin.xml to require "Spring Support" plugin to be activated. Navigate to target to see all available extension points.
Note that "Spring Support" plugin itself has dependencies to a few other plugins which need to be enabled in your sandbox (see notifications on startup).
A Spring facet can be attached on a Module.
Spring facets usually contain one more user-configured/provided filesets, which group a set of Spring related configuration files (XML, Code or .properties files).
A fileset usually corresponds to one actual application context configuration at runtime.
Filesets can depend on other filesets (possibly in another module).
As an API-user, you will usually rather work with SpringModel (which is built on top of fileset(s)).
How do I...
Obtain Spring Model by file, PsiElement, ..
Contribute implicit model(s)
com.intellij.spring.SpringModelProvider to provide implicit filesets (e.g. provided by another framework in specific configuration file).
Contribute implicit beans
com.intellij.spring.model.SpringImplicitBeansProviderBase to provide implicit (framework-specific) beans (e.g. "servletContext" by Spring MVC).
All support for XML-based Spring configuration files is provided via DOM-API.
Add support for additional Spring namespace
com.intellij.spring.dom.SpringCustomNamespaces, registered namespace-key must match the one registered with your DOM elements via
Register available elements via standard
Add reference to Spring Bean in my DomElement
Use the following template:
Add inspections to Spring Validator
Add additional inspections (e.g. for custom namespace) to Spring Validator (Settings|Compiler|Validation) via EP
Configure Spring support for other frameworks
com.intellij.spring.facet.SpringConfigurator to provide "automatic" configuration when Spring facet is added via framework wizard.