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 44 Next »

IDEA versions

Icon

Some features may not be available in all versions.
IDEA 8+ means "IDEA 8 or any higher version"

Please see Struts2PluginChangeNotes for more information.

Getting started

Icon

"Hello World" with Struts 2 and IntelliJ IDEA 8 - Detailed introductory blog post by Tabrez Iqbal

Symbol

Status

(minus)

planned

(plus)

in progress

(tick)

done

(question)

future planning

IDE integration

(tick) "Go To Action/Package" by name

Press Ctrl+Shift+Alt+N (Go To -> Symbol) to quickly navigate to any Action/Package by simply entering its name (including wildcards):

(tick) Dedicated icons for configuration/JAVA (Action) files

Recognize Struts related files/classes at a glance throughout the IDE (Project/Packages View, Editor tabs, Autocompletion, ..):

Struts 2 facet

All plugin configuration settings are bundled in a dedicated facet. Simply attach a new Struts 2-facet to an existing Web-facet, create a fileset and add your struts.xml files from all auto-scanned configuration files in your project and the plugin is ready to work.

Fileset configuration

Icon

struts-default.xml from struts2-core.jar as well as any struts-plugin.xml from plugins (e.g. Spring integration) have to be added additionally to the fileset. Also make sure to add all files used via <include>.
(warning) Many features will NOT work if this setup has not been performed properly.

(tick) Dedicated facet with configuration options
(tick) File Set manager

Group and manage your struts.xml-files with an easy to use editor, providing maximum flexibility w/r to your project setup.

(tick) Detect struts.xml files not mapped to file sets

Spot setup errors easily, additionally providing a quickfix to add the unmapped struts.xml-files to any existing fileset.

(tick) Library validator/setup

Creates IDEA project/module-library and - if required - downloads all necessary JAR files required for Struts 2.

(minus) Library validator/setup for standard plugins (Spring, Tiles, JSF, ..)
(tick) Autodetection of Struts 2 facets

Existing struts.xml-files are recognized upon opening your project and a new S2 facet will be created automatically.

(tick) Integration with "New Project"

Add a blank ready-to-start Struts 2 application template by selecting Struts 2 from the list of available technologies. A S2-facet with default fileset and an empty struts.xml-file already mapped in web.xml will be created automatically, all necessary libraries will be setup as well.

struts.xml/validation.xml

(plus) Autocompletion for all possible elements

Auto-completion is available for virtually all tags and attributes, just give it a try:

(plus) Rename refactoring/Find Usages for all referencable elements

Need to refactor your S2 application? Just use the Rename refactoring (Shift+F6) or perform Find Usages (Alt+F7 or Ctrl+Alt+F7):

(tick) Navigation to referenced elements

Simply Ctrl-click (or press Ctrl+B) on any element to navigate to its declaration - or take a peek without leaving the current editor using Quick Definition Lookup (Ctrl+Shift+I).

(plus) Highlighting of configuration/reference errors

Errors are highlighted immediately in the editor, additional validation is triggered for Make Project.
IDEA 7: see "Validation" tab in S2 facet for more options
IDEA 8+: see Settings->Compiler->Validation

(plus) Quickfixes
(tick) struts.xml: restrict resolving to <result> value depending on result-type (e.g. Tiles, Velocity)

IDEA 10+

(plus) Various inspections for common configuration errors

Highlight common configuration errors or possible problems on-the-fly.

(tick) Structure View

Visually groups all relevant info with Autoscroll from/to source:

(tick) Pageflow graph (struts.xml)

IDEA 8+
Graph of all relevant S2 elements.

validation.xml

(minus) Navigation to/from corresponding Action-class
(minus) Show validation.xml node(s) under corresponding Action-class (like GUI-Designer forms)
(minus) Create corresponding validation.xml-template from Action
(tick) Structure View

Actions (JAVA/Groovy)

(tick) Navigation to Action-declaration in struts.xml

Simply click on the action icon in the left editor bar to quickly open up the corresponding mapping(s) in struts.xml:
IDEA 8.1.1+: also for Groovy

(minus) Highlight unused Actions, Quickfixes: Delete, Map in struts.xml
(minus) Autocompletion/navigation to result-declaration in struts.xml

JSPs

(tick) Navigation to Action-declaration/class

Click on the Action-class icon to quickly open the corresponding JAVA/Groovy-class or Ctrl+click on the "action"-attribute to go to the struts.xml-definition:

(minus) Autocompletion/navigation for form properties
(plus) Autocompletion/navigation for other tags

Autocompletion is available for most attributes with static values.

(tick) JavaScript support

(plugin "JavaScript Support" must be enabled)
Enjoy the power of IDEA's powerful JavaScript-support within all S2 UI-tags.

(tick) CSS support

(IDEA 8+: plugin "CSS Support" must be enabled)
Define inline-styles (cssStyle) or reference existing CSS classes (cssClass).

(tick) I18N-support

IDEA 10+
Support for .properties-based I18N for <s:text> (can be disabled in S2 facet, tab "Features").

Plugins/3rd Party Extensions

(tick) Support struts2-spring-plugin

(plugin "Spring Support" must be enabled and Spring facet configured properly)
Reference Spring beans where supported (e.g. in <action> "class", <constant> "value").

(plus) Support Convention plugin

IDEA 9+
Sophisticated configuration properties support

Autocompletion/navigation/usage search in annotations (WIP):

(tick) Integration with Tiles 2

(plugin "Struts 1.x" must be enabled)
IDEA 8.1.1+
struts2-tiles-plugin.jar must be present as well as Tiles libraries. Configured tiles.xml-files will be set automatically as described in http://struts.apache.org/2.x/docs/tiles-plugin.html.

  • No labels