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.
Sometimes, especially when dealing with other APIs, the classes generated by @Model annotation need to reference non-JSON-like data structures. Find a way to allow that.
Created attachment 157706 [details] Model.instance = true to keep private state
Please review, thanks in advance for your comments.
In your example in the diff, you don't show, how/if the value can be initialized/injected. Can you show if/how that's done?
It cannot be injected. The implementation class (the one annotated by @Model) needs to have accessible default constructor. That constructor is used to create the instance. Obviously such constructor does not have any parameters, so no initialization is possible. Later one can, however, call any @ModelOperation method and pass in additional configuration parameters. I can put the previous paragraph into Javadoc, it may be a common question.
Explanation added: http://source.apidesign.org/hg/html~html4j/rev/558934b8b835
Unless there are objections, I integrate the change on Monday.
Merged as http://hg.netbeans.org/html4j/rev/02568f34628a