[ANN] Struts Plugin V0.8 for IDEA 5.0.2 (EAP)

for build 3516, available via plugin manager

V0.8 (10-17-05): Major rewrite

KNOWN ISSUES
- autocomplete for static web resources does not work all times, will get fixed in IDEA 5.0.2
- "value"-attribute containing multiple paths separated by "," (e.g. to tiles-defs) does not highlight errors correctly when there's whitespace/linebreak in text


Changes:
- Complete rewrite of all navigations/inspections, supporting autocompletion/error-highlighting etc.
- Auto-completion/Error-highlighting/Subclass-check for all attributes containing Class-names
- Removed superfluous inspections covered automatically by new navigation functionality now
- InvalidForwardReferenceInspection (JAVA): verify ActionForward-names returned from Action against valid (global) forward
- RefactoringSupport: struts-config.xml: rename form-bean; tiles-defs: parent definition name
- Support for DynaActionForm-properties
- Support for multiple Struts modules
- Validator: validation.xml: autocomplete/highlight/navigation to form/form-property, message-keys; JSP: "formName"
- Tiles JSP Tags: autocomplete/highlight/navigation for many attributes
- GoToSymbol (CTRLSHIFTALT+N): goto Action-declaration by entering path; goto Tiles-definition/Form-Bean by entering name
- Allow Struts Code being placed in JAVA-Module used by depending WebModule
- Settings dialog: moved to Project Settings->Modules Tab
- Settings dialog: added configuration file/statistics overview
- Settings: option to disable support for property-keys (e.g. when using different resource mechanisms)
- Improved inspection run times

Thanks to everyone who tested/commented during the beta versions!

Yann

0
Avatar
Permanently deleted user

Uh. It does seem to work differently than the previous version. Is it supposed to manage a situation like the following?

]]>

the action chaining in the "success" for the /addPersonalList action is marked red...

Also, it does not seem to recognize my tiles definitions anymore: it shows them as red (but it is still able to ctrl-shift-I them or ctrl-B to them!).

I'm afraid... could it be that I have the Struts assistant installed?

0

the action chaining in the "success" for the /addPersonalList action is marked red...

This should work. I suppose both actions are declared in the same struts-config.xml? Do you get proper autocompletion with action-path entries (.do) ?

Please check the settings tab if all struts-config.xml files and corresponding tiles-defs.xml files were properly recognized. If not, please check first the configuration steps on the plugin homepage.

Struts Assistant should not have any influence on Struts Plugin.

HTH,
Yann

0
Avatar
Permanently deleted user

Struts Assistant should not have any influence on
Struts Plugin.


But apparently struts navigator has it... I uninstalled and the problems disappeared! ;)

0

indeed, it does

didn't you get a warning message on startup?

0
Avatar
Permanently deleted user

Whoops, do you mean THAT message? I imagine I read it the first time, and then... just ignored it, seen that everything seemed to work. Then when I reinstalled your plugin it stopped working: maybe there are dependencies on the order plugins are installed? Sorry, and thanks for your help.

0
Avatar
Permanently deleted user

Sorry to bother again: I noticed that the "modules" settings window is not resizable anymore: since there is a "Struts plugin" tab with a relatively long fixed textarea I imagine it is the plugin's fault. The textarea in my case shows this:





Module: stratosfera-storefront, ActionServlet: *.do
- C:\Stratosfera\Storefront\war\WEB-INF\cfg\struts-config-catalog.xml, Module-Prefix:[None]
Actions: 24 FormBeans: 7
- C:\Stratosfera\Storefront\war\WEB-INF\cfg\struts-config-list.xml, Module-Prefix:[None]
Actions: 38 FormBeans: 4
- C:\Stratosfera\Storefront\war\WEB-INF\cfg\tiles-defs-print.xml, Definitions: 5
- C:\Stratosfera\Storefront\war\WEB-INF\cfg\tiles-defs-ord.xml, Definitions: 6
- C:\Stratosfera\Storefront\war\WEB-INF\cfg\tiles-defs-cat.xml, Definitions: 8
- C:\Stratosfera\Storefront\war\WEB-INF\cfg\struts-config-pers.xml, Module-Prefix:[None]
Actions: 25 FormBeans: 9
- C:\Stratosfera\Storefront\war\WEB-INF\cfg\struts-config-search.xml, Module-Prefix:[None]
Actions: 2 FormBeans: 1
- C:\Stratosfera\Storefront\war\WEB-INF\cfg\struts-config-navigation.xml, Module-Prefix:[None]
Actions: 1 FormBeans: 0
- C:\Stratosfera\Storefront\war\WEB-INF\cfg\struts-config-trolley.xml, Module-Prefix:[None]
Actions: 11 FormBeans: 1
- C:\Stratosfera\Storefront\war\WEB-INF\cfg\struts-config-library.xml, Module-Prefix:[None]
Actions: 12 FormBeans: 5
- C:\Stratosfera\Storefront\war\WEB-INF\cfg\struts-config-header.xml, Module-Prefix:[None]
Actions: 6 FormBeans: 1
- C:\Stratosfera\Storefront\war\WEB-INF\cfg\struts-config-layout.xml, Module-Prefix:[None]
Actions: 0 FormBeans: 0
- C:\Stratosfera\Storefront\war\WEB-INF\cfg\struts-config-reg.xml, Module-Prefix:/reg
Actions: 14 FormBeans: 3

Module: stratosfera-backoffice, ActionServlet: *.do
- C:\Stratosfera\Backoffice\war\WEB-INF\cfg\struts-config-layout.xml, Module-Prefix:[None]
Actions: 2 FormBeans: 1
- C:\Stratosfera\Backoffice\war\WEB-INF\cfg\tiles-defs.xml, Definitions: 72
- C:\Stratosfera\Backoffice\war\WEB-INF\cfg\struts-config-category.xml, Module-Prefix:[None]
Actions: 6 FormBeans: 4
- C:\Stratosfera\Backoffice\war\WEB-INF\cfg\struts-config-product.xml, Module-Prefix:[None]
Actions: 11 FormBeans: 4
- C:\Stratosfera\Backoffice\war\WEB-INF\cfg\struts-config-slot.xml, Module-Prefix:[None]
Actions: 12 FormBeans: 6
- C:\Stratosfera\Backoffice\war\WEB-INF\cfg\struts-config-promotion.xml, Module-Prefix:[None]
Actions: 7 FormBeans: 3
- C:\Stratosfera\Backoffice\war\WEB-INF\cfg\struts-config-customers.xml, Module-Prefix:[None]
Actions: 6 FormBeans: 4
- C:\Stratosfera\Backoffice\war\WEB-INF\cfg\struts-config-report.xml, Module-Prefix:[None]
Actions: 1 FormBeans: 1

0

will be gone in next update (in 2 hours) ;)

0

Does it support Struts 1.2? When the struts-config.xml contains

 ]]>

, and the plugin reports no struts-config.xml found. Please check it.

0

the URI is wrong, you must use the official DOCTYPEs from the DTDs supplied in your Struts distribution:

]]>

0

It is generate by XDoclet and exits in some 1.2.x verion, and I think you can include it.

0

Well, it does not exist in 1.2.6 /1.2.7.

Could you point me to the version where this old URI is used?

0
Avatar
Permanently deleted user

validation.xml: field property values are red when the form is a
dynaform. Please use the yellow/orange color that IJ uses to indicate a
value that may be incorrect when the form type is a dynaform.

I have a forward that will not validate. Here is the method:

1 /**
2 * Clears all JXPortal caches.
3 * @param mapping
4 * @param form
5 * @param request
6 * @param response
7 * @return
8 * @throws Exception
9 * @noinspection MethodMayBeStatic
10 */
11 public ActionForward resetCaches(ActionMapping mapping,
12 ActionForm form,
13 HttpServletRequest request,
14 HttpServletResponse response) throws Exception {
15 JxpLogger logger = CommonTools.getLogger(request);
16 CommonTools.clearCaches(logger);
17 ActionMessages msgs = new ActionMessages();
18 ActionMessage msg = new ActionMessage("errors.detail", "Caches have been reset.");
19 msgs.add(ActionErrors.GLOBAL_MESSAGE, msg);
20 saveErrors(request, msgs);
21 return mapping.findForward("clearCaches");
22 }
23
24


Line 21 shows clearCaches as underlined w/red squiggly line - Could not
resolve (Global) forward "clearCaches".

Here is the action from struts-config.xml

1 7 8 9 10 11 12 Here is the form that uses the method: 1 2

3
Reset Caches
4
5
6 This will cause a reload of all JusticeXchange cached information. This includes all the key 7 value information (hair, eye, gender, race, etc), record types, state and agency information. 8 This can be used anytime information has been changed in the database and the site needs to be 9 made aware of the changes. 10
11
12 ]]>
13 <html:image src="$" alt="Reset" value="reset"/>
14 </div>
15 </div>
16 </div>
17 </html:form>
18



Yann Cebron wrote:

for build 3516, available via plugin manager

>

V0.8 (10-17-05): Major rewrite

>

KNOWN ISSUES
- autocomplete for static web resources does not work all times, will get fixed in IDEA 5.0.2
- "value"-attribute containing multiple paths separated by "," (e.g. to tiles-defs) does not highlight errors correctly when there's whitespace/linebreak in text

>
>

Changes:
- Complete rewrite of all navigations/inspections, supporting autocompletion/error-highlighting etc.
- Auto-completion/Error-highlighting/Subclass-check for all attributes containing Class-names
- Removed superfluous inspections covered automatically by new navigation functionality now
- InvalidForwardReferenceInspection (JAVA): verify ActionForward-names returned from Action against valid (global) forward
- RefactoringSupport: struts-config.xml: rename form-bean; tiles-defs: parent definition name
- Support for DynaActionForm-properties
- Support for multiple Struts modules
- Validator: validation.xml: autocomplete/highlight/navigation to form/form-property, message-keys; JSP: "formName"
- Tiles JSP Tags: autocomplete/highlight/navigation for many attributes
- GoToSymbol (CTRLSHIFTALT+N): goto Action-declaration by entering path; goto Tiles-definition/Form-Bean by entering name
- Allow Struts Code being placed in JAVA-Module used by depending WebModule
- Settings dialog: moved to Project Settings->Modules Tab
- Settings dialog: added configuration file/statistics overview
- Settings: option to disable support for property-keys (e.g. when using different resource mechanisms)
- Improved inspection run times

>

Thanks to everyone who tested/commented during the beta versions!

>

Yann

0

1) validation.xml and DynaForms: will check this

2) Forward "clearCaches": I suppose this method is in DispatchAction (or subclass) - do the other "execute()"-methods work regarding resolution of possible ActionForwards? Config looks OK at first glance.


Thanks,
Yann

0

regarding 1):

This works for me using org.apache.struts.validator.DynaValidator[Action]Form as long as you reference the form in validation.xml's

]]>

with the formbean-name defined in struts-config.xml; reference to formbean via action-path is currently not supported.

0
Avatar
Permanently deleted user

The clearCaches forward appears to be the only one that it cannot find.

I am kind of lost on the validation.xml

Here is a snipped that shows the red:


Here is the declaration of the lineupForm:


Yann Cebron wrote:

1) validation.xml and DynaForms: will check this

>

2) Forward "clearCaches": I suppose this method is in DispatchAction (or subclass) - do the other "execute()"-methods work regarding resolution of possible ActionForwards? Config looks OK at first glance.

>
>

Thanks,
Yann

>



Attachment(s):
moz-screenshot-2.jpg
moz-screenshot-3.jpg
0

Does it support Map-backed ActionForm, such as following:
<html:text property="value(foo)"/>
and Struts plugin raises error,but it is correct.
Please reference:
http://struts.apache.org/userGuide/building_controller.html#map_action_form_classes

0

please reference Struts 1.2.2 version, and it use

]]>

and I think a lot of tools still use this doctype, please add this doctype support.

0

Ok, now I see the reason for the errors in your validation.xml - it's a LazyValidatorForm. Will add support for this as well in next version.

Will try to investigate again regarding resolution of ActionForwards in DispatchActions.

Thanks,
Yann

0

1.2.2 will be included ASAP then

thanks for spotting!

0

This should be easy to ignore in validation ;)

0

请先登录再写评论。