[ANN] Struts Plugin V0.6

Mainly performance enhancements and new inspections/navigation possibilities for ActionForm properties and global forwards.

Changes in detail:

- Add support for global forwards (navigation/quick show in struts-config.xml&JSP; inspections: forward resource path & reference in Struts HTML-tags)
- InvalidActionFormPropertyReference (JSP): verify "property" attributes of Struts-HTML-tags against mapped ActionForm-class determined by "action"-attribute of enclosing html:form-tag
- GotoDeclaration/QuickShowImplementation (JSP): support for "property" attributes of Struts-HTML-tags, goto/show property from ActionForm-class
- Add support for Struts HTML-EL taglib
- Improve overall Inspection Run Times
- Reset Inspection Run Times after loading project and count only real inspection runs
- Display warning message about not using Struts Plugin and Struts Navigator simultaneously
- Bugfix: NPE when encountering unresolvable Servlet-class in web.xml
- More productivity tips

Enjoy,

Yann
- Some other minor bugfixes

13 comments
Comment actions Permalink

Properties of DynaActionForm not resolving in jsps. All the properties in my jsp below are marked "Could not resolve property with name "xxxxxx" in ActionForm class "DynaActionForm""

struts-config:

         
         
         


 
]]>


JSP:



]]>

0
Comment actions Permalink

damn, I knew I forgot something ;) thanks for the hint, will implement this ASAP

Cheers,

Yann

0
Comment actions Permalink

Also, I have a form that has a dynamic action value. The plugin is marking the whole form red. Resolving that action probably isn't doable so we need a way to "turn off" the inspection.

]]>

0
Comment actions Permalink

Nevermind about turning it off, figured that out. But, is there any way you can resolve that action so I don't have to turn off all the jsp inspections?

0
Comment actions Permalink

already fixed for next version ;)

btw, this is already implemented for "$"-expressions in "property"-attributes

0
Comment actions Permalink

Okay, nevermind again. Of course you can't resolve that action. So, either I
need to turn off the jsp inspections or refactor so I don't have dynamic
actions. Probably should have done the latter in the first place (I wasn't
the original developer though:)).

" Brad L." <no_mail@jetbrains.com> wrote in message
news:5636866.1125332272883.JavaMail.javamailuser@localhost...

Nevermind about turning it off, figured that out. But, is there any way
you can resolve that action so I don't have to turn off all the jsp
inspections?



0
Comment actions Permalink




If the form is a descendant of any of the lazy forms, then you should
probably quietly ignore the checks or do the cool thing that IntelliJ
does when it is evaluating EL of gets from a map and color it
brownish-yellow, etc.:



Yann Cebron wrote:

>Mainly performance enhancements and new inspections/navigation possibilities for ActionForm properties and global forwards.
>
>Changes in detail:
>
>- Add support for global forwards (navigation/quick show in struts-config.xml&JSP; inspections: forward resource path & reference in Struts HTML-tags)
>- InvalidActionFormPropertyReference (JSP): verify "property" attributes of Struts-HTML-tags against mapped ActionForm-class determined by "action"-attribute of enclosing html:form-tag
>- GotoDeclaration/QuickShowImplementation (JSP): support for "property" attributes of Struts-HTML-tags, goto/show property from ActionForm-class
>- Add support for Struts HTML-EL taglib
>- Improve overall Inspection Run Times
>- Reset Inspection Run Times after loading project and count only real inspection runs
>- Display warning message about not using Struts Plugin and Struts Navigator simultaneously
>- Bugfix: NPE when encountering unresolvable Servlet-class in web.xml
>- More productivity tips
>
>Enjoy,


Yann

>- Some other minor bugfixes

>



Attachment(s):
moz-screenshot-4.jpg
moz-screenshot-3.jpg
moz-screenshot-5.jpg
0
Comment actions Permalink

If I hold down CTRL and hover my mouse over then name of an action on a
form, it does not underline it, but it does take me there if I click
it. Is this plugin doing that? If so, can you make it underline like
the rest of IJ?

Also, when I am in the struts-config.xml file, I can click on the value
in the name attribute and it will take me to the form declaration. Can
you also make it take me to the form block in the validation.xml if I
CTRL-click the validate="true" part of the action declaration?

Another request (a super cool one). Is it possible to have the
CTRL-click on the parameter part of the form action of a dyna action
take you to that method? The value could be on the form action or in a
hidden field. That one would be super cool, but may not be so easy.

Yann Cebron wrote:

>Mainly performance enhancements and new inspections/navigation possibilities for ActionForm properties and global forwards.
>
>Changes in detail:
>
>- Add support for global forwards (navigation/quick show in struts-config.xml&JSP; inspections: forward resource path & reference in Struts HTML-tags)
>- InvalidActionFormPropertyReference (JSP): verify "property" attributes of Struts-HTML-tags against mapped ActionForm-class determined by "action"-attribute of enclosing html:form-tag
>- GotoDeclaration/QuickShowImplementation (JSP): support for "property" attributes of Struts-HTML-tags, goto/show property from ActionForm-class
>- Add support for Struts HTML-EL taglib
>- Improve overall Inspection Run Times
>- Reset Inspection Run Times after loading project and count only real inspection runs
>- Display warning message about not using Struts Plugin and Struts Navigator simultaneously
>- Bugfix: NPE when encountering unresolvable Servlet-class in web.xml
>- More productivity tips
>
>Enjoy,


Yann

>- Some other minor bugfixes

>

0
Comment actions Permalink

I think I'm going for just ignoring them, thanks for spotting this

0
Comment actions Permalink

Hi Norris,

+
If I hold down CTRL and hover my mouse over then name of an action on a form, it does not underline it, but it does take me there if I click it. Is this plugin doing that? If so, can you make it underline like
the rest of IJ?
+

I'd like too, but I have no clue how to do this correctly. Also it seems I should code my navigation in a different way, then IDEA would underline navigation targets by itself (if I remember right from another thread).

+
Also, when I am in the struts-config.xml file, I can click on the value in the name attribute and it will take me to the form declaration. Can you also make it take me to the form block in the validation.xml if I
CTRL-click the validate="true" part of the action declaration?
+
Integration with commons-validator would be possible (and shouldn't be harder than the rest to do) but it's rather near the end of my TODO list.

+
Another request (a super cool one). Is it possible to have the CTRL-click on the parameter part of the form action of a dyna action take you to that method? The value could be on the form action or in a hidden field. That one would be super cool, but may not be so easy.
+
I already have some ideas regarding support for DispatchAction & friends, stay tuned ;) some navigation possibilities are actually quite easy to do, others not .. we'll see what happens ;)

Thanks for your comments,

Yann

0
Comment actions Permalink

Could you put the highlighting on your todo list?

Yann Cebron wrote:

>I think I'm going for just ignoring them, thanks for spotting this

>

0
Comment actions Permalink

Wow. I just started using your plugin and it is very nice. I have a
long struts config in one of my projects. I had not worked on that
project for a few weeks. I opened it up to change something and had to
modify the struts config. Some of the forwards were red. I tracked
them down and sure enough, they are missing. Nice catch.

The navigation from a form action to the declaration and then to the
action's form is also very nice. This is coming along very nicely.

Yann Cebron wrote:

>Mainly performance enhancements and new inspections/navigation possibilities for ActionForm properties and global forwards.
>
>Changes in detail:
>
>- Add support for global forwards (navigation/quick show in struts-config.xml&JSP; inspections: forward resource path & reference in Struts HTML-tags)
>- InvalidActionFormPropertyReference (JSP): verify "property" attributes of Struts-HTML-tags against mapped ActionForm-class determined by "action"-attribute of enclosing html:form-tag
>- GotoDeclaration/QuickShowImplementation (JSP): support for "property" attributes of Struts-HTML-tags, goto/show property from ActionForm-class
>- Add support for Struts HTML-EL taglib
>- Improve overall Inspection Run Times
>- Reset Inspection Run Times after loading project and count only real inspection runs
>- Display warning message about not using Struts Plugin and Struts Navigator simultaneously
>- Bugfix: NPE when encountering unresolvable Servlet-class in web.xml
>- More productivity tips
>
>Enjoy,


Yann

>- Some other minor bugfixes

>

0
Comment actions Permalink

For all those interested in upcoming features/releases, I've updated the homepage with a couple of notes:

http://www.intellij.org/twiki/bin/view/Main/StrutsPluginDevelopment

Greetings,

Yann

0

Please sign in to leave a comment.