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.
With switch to Retouche it is not possible to easily rewrite current infrastructure for creation of EJB methods. In MethodCustomizer there was directly used method element from Java infrastrucure API, but that is not very clean and Retouche API requires to think more about javac context and 'transactions'. Therefore I would like to introduce Java infrastructure independent method model to use for this. Changes I am thinking about: 1) new friend package org.netbeans.modules.j2ee.common.method 2) MethodModel immutable class for holding all model data 3) changing org.netbeans.modules.j2ee.common.ui.nodes.MethodCollectorFactory to accept MethodModel 4) changing org.netbeans.modules.j2ee.common.ui.nodes.MethodCustomizer to accept MethodModel 5) move MethodCollectorFactory and MethodCustomizer from .ui.nodes to .method package 6) removing friend package org.netbeans.modules.j2ee.common.ui.nodes Prototype is ready in j2ee/utilities module at org.netbeans.modules.j2ee.common.method package. Note, that MethodCustomizer implementation is just place holder currently.
This change is in the friend API j2ee/utilities and all affected friends are under control of our team.
Looks nice. Please document if MethodModel's methods can return null. Also document if null can be passed to the factory methods in MethodModelSupport. Checking is identifiers passed to MethodModel are really Java identifiers could be also nice. Is there a client calling MethodModelSupport.createMethodModel(String)? If not, consider removing that method. Suggest the factory methods in MethodModelSupport not related to the Java infrastructure be moved to MethodModel and renamed to create(). Perhaps MethodModel.VariableModel could be named just Variable, don't know. What is the reason for using '"arg" + index++,' as the variable name in MethodModelSupport? Why not pass parameter.getName()? While testing for ElementKind.CLASS in MethodModelSupport.getTypeName() you are leaving out interfaces and enums. Perhaps you could use ElementKind.isClass() and isInterface().
Thanks for comments, I incorporated them all. I will add org.netbeans.modules.j2ee.common.method to friend packages.
Fixed. http://www.netbeans.org/source/browse/j2ee/utilities/src/org/netbeans/modules/j2ee/common/ui/nodes/MethodCustomizerPanel.form?r1=1.1&r2=delete http://www.netbeans.org/source/browse/j2ee/utilities/src/org/netbeans/modules/j2ee/common/ui/nodes/MethodCustomizer.java?r1=1.39&r2=delete http://www.netbeans.org/source/browse/j2ee/utilities/src/org/netbeans/modules/j2ee/common/ui/nodes/MethodCollectorFactory.java?r1=1.12&r2=delete http://www.netbeans.org/source/browse/j2ee/utilities/src/org/netbeans/modules/j2ee/common/ui/nodes/Bundle.properties?r1=1.17&r2=delete http://www.netbeans.org/source/browse/j2ee/utilities/src/org/netbeans/modules/j2ee/common/ui/nodes/MethodCustomizerPanel.java?r1=1.1&r2=delete http://www.netbeans.org/source/browse/j2ee/utilities/nbproject/project.xml?r1=1.47&r2=1.48 http://www.netbeans.org/source/browse/ide/golden/group-friend-packages.txt?r1=1.15&r2=1.16 http://www.netbeans.org/source/browse/ide/golden/friend-packages.txt?r1=1.74&r2=1.75