Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: updates for changes in 14

...

As an API-user, you will usually rather work with SpringModel (which is built on top of fileset(s)).

How do I...

Info

Some core classes have been changed in 14, please see "Version 14" notes for info on how to replace existing API-calls

Spring Model

Obtain Spring Model by file, PsiElement, ..

...

Version 14
See com.intellij.spring.model.scope.SpringCustomBeanScope to provide custom (e.g. framework specific) bean scopes.

Beans

Search for bean by name

com.intellij.spring.CommonSpringModel#findBeanByName
Version 14: com.intellij.spring.model.utils.SpringModelSearchers#findBean

Search for beans by type

Choose one of com.intellij.spring.CommonSpringModel#findBeansByPsiClassXXX variants.
Version 14: com.intellij.spring.model.utils.SpringModelSearchers#findBeans

Find out whether bean with name/type exists

Version 14: com.intellij.spring.model.utils.SpringModelSearchers#doesBeanExist

XML Configuration

All support for XML-based Spring configuration files is provided via DOM-API.

...

See EP com.intellij.spring.dom.SpringCustomNamespaces, registered namespace-key must match the one registered with your DOM elements via @Namespace.
Register available elements via standard DomExtender<Beans> EP or com.intellij.spring.dom.SpringCustomNamespaces#registerExtensions (Version 14).
Please pay attention to getModelVersion and getStubVersion (see javadoc).

Add reference to Spring Bean in my DomElement

...