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.
The Navigator does not handle generics properly, either as argument types or return types. E.g., List<Integer> foo(List<Float> bar) { ... } misinterprets both types in pop-ups and lists.
Correct that it doesn't handle them - but I'd welcome suggestions on how it *should* handle them. Do you have any suggestions?
Here is one suggestion: Navigator should display generics properly. In both the list displays and the pop-up displays, it does not show generic types properly. E.g., Set<Integer> is sometimes shown as "Set", sometimes shows as "Integer>", sometimes omitted entirely, depending on view and position. Problems occur when generics are used as paramter types, return types, and class types, at least. Inheritance Structure view seems to show generics properly for the superclass (extends), but I haven't seen any other case that works. In Inheritance Structure view the class itself is not right (e.g., public class ObjectTreeSetHashMap<K, V> omits the <K, V> in the class type. There may be other problems as well, but I haven't figured out how to use other Navigator functionality yet (e.g., drag and drop reorganizaiton or method overriding, both of which were "advertised" features in the descripion).
> drag and drop reorganizaiton or method overriding In the method list, right click a node and choose Sort by Order (I think that was the menu item title). Then you'll be able to reorder methods/fields/etc via drag and drop (it would be meaningless in an alphabetized list). Method overriding works if the filter is set to include inherited elements or you're in the inheritance tree, but the override method implementation is pretty prototypey and should be rewritten - it won't handle inner classes correctly yet.
I cannot get any context menus. I've tried every view and every filter, and right-cliked everywhere on and off nodes. The only context menu I get is on the Navigator menu title bar and that menu only contains 3 basic window operations. How can I find the context menus? Do they providing the sorting and the method overriding? FYI, I'm now in 4.0 RC1. The only Navigator functionality I can access is the selection of nodes, which warps me to the definition in the file and shows the in-class callers/users. There are distinct icons on the different nodes. Are these documented anywhere? When Navigator first installed there was a text file that came up with some explanations -- is there any way to find it again to see how to interpret the icons and/or access the functionality I can't find?
Hello, I just installed the navigator+javagator modules, and have seen problems regarding the JDK1.5 support: tooltip for the methods with generics return value and/or parameters is broken. I am attaching a patch that hopefully fixes this problem. Part of the archive is also a test class to partially test this functionality.
Created attachment 19068 [details] A patch to the JDK1.5 tooltip problem.
Moving to objectbrowser/navigator.
Patch integrated, thanks alot! So now generics work in tooltips, what is left is better generics support in the lists and trees. However generics like List<? extends E> still could be displayed better, will need further effort.
I have hopefully improved the behaviour for "List<? extends E>" like generics. Patch attached. The methods JUtils.convertToSimpleName and JUtils.separateClassName are package private, so they can be tested by the test. I think that they should remain package private, if it is not a big problem. The HTML coloring could be a bit improved in the future for the "List<? extends E>" like generics (highlighting "extends" and "super").
Created attachment 19404 [details] Patch improving behaviour for the "List<? extends E>" like generics.
Patch applied and verified that it works correctly, however for right end user effect, there needs to be javacore bug 53742 fixed first.
fixed in main trunk Checking in src/org/netbeans/modules/javanavigation/JUtils.java; new revision: 1.12; previous revision: 1.11 test/unit/src/org/netbeans/modules/javanavigation/JUtilsTest.java; new revision: 1.2; previous revision: 1.1
Resolving as fixed, just note that end user will see correct results only after 50260 will be fixed.