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.
Hi, I have just had a look at the UML tools in the preview of Version6 M9, and it looks great. I don't know if I should be raising a bug against a this release, but I noticed that the prefix character I chose for member attributes ("_") was not added to the generated code. I think this is a useful feature, since I like to add an underscore to private attributes. Many thanks Bernie
I'm unable to reproduce the issue. My generated codes always included "_" when I used it as prefix to name my member attributes. I have tried on both Windows XP and Linux platforms. Could you please provide more detail and steps to reproduce this problem and the platform you see the problem on.
Thanks for the response My OS is Mac (Intel) v10.4.9 Info from Netbeans About: NetBeans IDE 6.0 Preview (M9, build 070502) 1.5.0_07; Java HotSpot(TM) Client VM 1.5.0_07-87 Mac OS X version 10.4.9 running on i386 en_US (nb); MacRoman UML module versions are 1.2.0 In Advanced Options: Prefix for Member Attributes => _ Remove Prefix for Accessor Name => Yes Choose New Project Java-Platform Model Accept default Name location Creae class diagram Create class test , add two attributes via diagram gui private int test1 private int _test2 (wasn't sure if you are supposed to add them, or only generated in code, so did both) The following operators are created public in getTest1() public void setTest1(int val) public int get_test2() public void set_test2(int val) Right clicked class in projects view, and selected generate code... Then Navigate to Source, get public class Test { private int test1; private int _test2; public Test () { } public int get_test2 () { return _test2; } public void set_test2 (int val) { this._test2 = val; } public int getTest1 () { return test1; } public void setTest1 (int val) { this.test1 = val; } } Let me know if these is any more info I can get you. I know in Eclipse, there is a PDE log for the plugins. Is there an equivalent log in Netbeans? Did not seen any no entry icon in status bar, so presume this was OK. Cheers Bernie
By the way, on a seperate point, I was trying a few things out, and noticed that if I have two classes, with a linking association class, the association class is not generated - is that correct? Can it be implemented in multiple ways (ie attributes in one of the classes) ? Cheers Bernie
Thanks for providing the additional detail. I now understand the issue and can reproduce it. Looks like it's a bug that setting the prefix has no effect. It's also related to issue 84291 for option "Remove Prefix from Accessor Names". > Is there an equivalent log in Netbeans? You can find the default ide log file from the following. {user-homedir}/.netbeans/6.0m9/var/log/messages.log As for association class, there's no code generated for it and it's by design. Currently there's an enhancement request for this. It's issue 92806.
In current uml version 'Prefix for Member Attributes' is a prefix used for names of auto-named attributes created as navigable association link. Add such link from class to class - you will see that attr is named as prefix+target class name. Remove Prefix for Accessor Name - for attr created as nav. assoc. link accessors will be generated without this prefix. This means that functionality that is useful for bernie doesn't exist now. request is: if attr created by user has prefix specified in special option (similar to 'Prefix for Member Attributes'), remove this prefix from accessors.