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 30096

Summary: SAX Document Handler Wizard should include DTDDoc comments in handler interface
Product: xml Reporter: Jesse Glick <jglick>
Component: ToolsAssignee: issues@xml <issues>
Status: NEW ---    
Severity: blocker    
Priority: P4    
Version: 3.x   
Hardware: PC   
OS: Linux   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on: 14296    
Bug Blocks:    

Description Jesse Glick 2003-01-14 21:04:28 UTC
I.e. if your DTD includes:

<!--- This does something. -->
<!ELEMENT foo EMPTY>
<!ATTLIST foo x PCDATA #REQUIRED>

Then the generated handler interface class should
look like:

/**
 * An empty element event handling method.
 * The element <code>&lt;foo&gt;</code> is
documented as follows:
 * <div>
 * This does something.
 * </div>
 * @param meta attributes
 * @throws SAXException if the content is invalid
 */
void handle_foo(Attributes meta) throws SAXException;

That would make the interface easier to implement.

BTW other changes shown here to improve generated
code: include @throws SAXException; correct @param
name (meta, not data!); 'public' keyword
gratuitous in an interface; 'final' keyword
meaningless on an interface param.

Also the interface should have no 'meta' param in
case there are no declared attributes for the
element. There should also be an option to pass
one param per declared attribute (null for
missing), I think, though some users may not want
to do this for performance reasons.

And 'java.lang.String' for 'data' params of PCDATA
elements should just read 'String'.
Comment 1 _ pkuzel 2003-03-14 21:17:37 UTC
Documentation is a grammar attribute.