This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 157954 - Struts Action Class - File Template Imports
Summary: Struts Action Class - File Template Imports
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Struts (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Vince Kraemer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-05 01:55 UTC by adam_myatt
Modified: 2009-11-10 21:29 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description adam_myatt 2009-02-05 01:55:12 UTC
Struts Action template import of org.apache.struts.action.Action can be improved. When you generate a new Struts Action 
class, it extends org.apache.struts.action.Action using the ${superclass} notation from the file template : 

 public class ${name} extends ${superclass} {

...which in my generated class looks like this:

public class NewStrutsAction extends org.apache.struts.action.Action {

This is fine, but the generated class (from the template) imports org.apache.struts.action.Action. The import is 
flagged by NetBeans as an unused import since the fully qualified class name is used after the extends keyword. I would 
argue then that perhaps the template should not import org.apache.struts.action.Action.

The consistency issue here lies in that the ActionForm template does not import org.apache.struts.action.ActionForm 
even though a generated ActionForm extends org.apache.struts.action.ActionForm.
Comment 1 Vince Kraemer 2009-11-10 20:52:29 UTC
I can take this one
Comment 2 Vince Kraemer 2009-11-10 21:29:00 UTC
http://hg.netbeans.org/web-main/rev/ca821a894468