Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0



OGNL (Object Graph Navigation Library) Support

Support for OGNL-expressions is currently under heavy development and scheduled for future IDEA 10.x releases.
This page reflects the current status and will provide public EAP versions for those interested in testing.

(tick) fully supported
(plus) partly supported
(minus) not done yet

with many language specific features is available since IDEA 11.
In 12.1+, Parser and PSI have been rewritten completely using GrammarKit.

titleUsing OGNL in non-Struts 2 context

Using "IntelliLang" plugin OGNL-language support can enabled anywhere: method calls, XML attribute values, ... (see Settings->Project Settings->Language Injections)

titleEditing tip

Please use intention "Edit OGNL fragment" (Alt+Enter while cursor on OGNL expression) for better editing capatibilities. To enable it: Settings->Intentions->Language Injection "Edit Injected Fragment"


PLEASE NOTE: Support is under development, some expressions might not be parseable (yet) and will highlight bogus errors. See list of known issues.




fully supported


partly supported


not done yet



Integration with Struts 2

The goal is to support OGNL-expressions everywhere in Struts 2 applications in the same way as done for EL-expressions in JSPs.

OGNL language is available automatically at the following places:

(tick) JSP(X)

Struts UI, JQuery

  • all attributes containing "%{" (multiple occurences possible)
  • all attributes with list expression "{ el1, el2, ..}"
  • <s:iterator> "value" (without any prefix)
(tick) Freemarker

Struts UI, JQuery

  • all attributes containing "%{" (multiple occurences possible)
  • all attributes with list expression "{ el1, el2, ..}"
(minus) Velocity
(minus) validation.xml
  • Validator "fieldexpression" -> "expression"

Editor highlighting

(tick) Syntax highlighting

Basic syntax highlighting (identifiers, numbers, string literals, keywords, ..)

Image Added

(tick) Escape sequences in strings

Highlight valid/invalid escape sequences

Image Added

(plus) Semantic highlighting

Highlight missing closing brackets, parentheses, expressions, ...
Image Added

Image Added

Image Added

(tick) Highlight matching parentheses, brackets and braces

Image Added

Image Added

(tick) Spellchecker

Strings and identifiers are checked for spelling errors using IDEA's integrated functionality.

(tick) Color settings page

Settings->Editor->Colors & Fonts->OGNL

Customize the appearance (color, style) to your needs:

Image Added


(tick) Auto-complete closing quote/tick
(tick) Auto-complete closing '}'

Will be inserted automatically after typing "%{" and "{".

(plus) Keywords

Context-sensitive variants.

(minus) Identifiers


(tick) CTRL+W support

Expand/shrink selected part of expression semantically by repeatingly pressing CTRL-(Shift)-W:
Image Added
Image Added
Image Added
Image Added

(plus) Reformat

Basic whitespace-formatting (before/after operators, parentheses, brackets, ...) using Java-settings.
To reformat, use intention "Edit OGNL fragment..." and run "Code->Reformat Code" from there.

(plus) Live templates

Create your own OGNL-specific live templates (Context "OGNL") or use one of the predefined templates (see Settings->Live Templates).
NOTE Expanding live templates in injected context works with CTRL+J

(minus) Complete Current Statement

Complete expression syntactically, e.g. adding missing closing ")", "}"

(minus) Surround With

Provide specific "Surround with.." functionality.


(minus) Go To Declaration

for identifiers

(minus) Go To Code references

Navigate to Class/Method references.


(minus) QuickDoc

Provide quick documentation on hovering over elements (type, name).