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.
Just yesterday I noticed the presence of this dialog, but I had trouble figuring out how to operate it. In some cases its layout and looks did not seem to indicate its behavior. I would like to suggest a number of changes to improve the useability of this dialog. These are described below. The functionality is great though, and thanks for adding it. The following suggestions are for changes to text that will improve the dialog by indicating more clearly how to use it: 1. Remove package name from dialog title. I selected a class before launching this dialog, so I know what package it's in. Package names are long and ugly - I think it's best to avoid them when possible as they clutter the UI too much. Just the class name would be better here. 2. Change text "All Inherited classes" to "Superclasses"; "Available methods" to "Superclass Methods"; "Options" to "View"; "Selected methods" to "Override Methods in Class <myclass>" (or possibly just "Override Methods"); and finally, change button label "Add" to "Add to Class". 3. Use headline capitalization throughout (see Java L&F guide for details) It is good to use button enabling/disabling to indicate that a button applies only when something is selected. With this in mind: 1. Only enable the "Add to Class" button when a method in the second panel is selected. 2. Only enable the "Remove" button when a method in the third panel is selected. Other problems and suggestions: 1. The first and second panels are related and should be grouped together in a single panel. Currently their separate borders makes them look independent. I would remove the "Available methods" border and make this just a piece of text above that section (the second panel). Then place the second panel's contents inside the first ("All Inherited classes") panel. 2. What is the order of the superclasses and interfaces shown in the first panel's list? It wasn't clear to me, and the presence of interfaces made this even harder to figure out. I would like these classes to be shown in ancestor order (immediate superclass first, followed by its superclass, etc). And again, the presence of interfaces was also confusing to me. 3. In the First panel if I press "Select all" I see many methods in the second panel. If I select one of these methods in the second panel, I would like to see the name of the class it is defined in. 4. Even as I write this, I'm still not sure about the third panel - why it's there, what it shows, etc (e.g. does it show all over-ridden methods in the class, or only those that meet some criteria?). I believe it is possible to remove this panel completely and modify the second panel to indicate an over-ride; the dialog would be simpler and (IMO) clearer. Details: Remove the third panel ("Selected methods"). If a method shown in the second panel is overridden by the selected class (the one selected before this dialog was opened), then indicate that on that method in the second panel. You could do that by, for example, modifying the icon of that overridden method. Thus, I could scroll through the list of methods in the second panel and see which ones are over-ridden. I could then select one of those methods and then press a button: "Override" or "Remove Override" to create a new override method, or remove an existing one.
I have some comments: 1) completely agree, that was a mistake, obviously. 2) probably "All supertypes" would be better, since that field displays both superclasses and superinterfaces if they are implemented either on the class itself or on one of its superclasses. 3) I'll ask our UI guy to see that the layout & controls comply with JLF Other P&S: 1) I'm no UI expert as you see from the layout of the tool and the New from template Wizard for java classes - thanks for suggestion. 2) The panel _should_ list superclasses in the reverse order of inheritance (the direct superclass first, j.l.Object last), then all interfaces in alphabetical order (since interfaces can inherit multiple things, linear order using inheritance chain may not be possible). Interfaces are there, because the superclass(es) can be abstract - then you need to fill in missing methods (at least). You can also use the interface for quickly locating the method you want to override - you know you are defining new Comparable semantic, but don't know what superclass (if any) defines the methods. The first list should really serve as a class filter for the second one. 3) good point. 4) The main purpose of the third panel is to show all methods in the target class, that override anything from its supertypes. I don't want apply class filter(s) here too much, because the panel gives clear indication what behaviour is modified. If we display this info only as checkmarks in a large method list, the user looses an overview of modified methods.
Thanks for the comments. I just wanted to mention one thing in response to your comment "If we display this info only as checkmarks in a large method list, the user looses an overview of modified methods.", and that is that the second panel could have two view options added: View "All Methods" and "Overrides Only". I believe that would fix this problem.
One more suggestion: it is currently very hard to read the method information contained in the List fields in the second and third panels. That's because the method name doesn't come first on each line. To find the method name I have to read through a return type name. I think it would greatly improve the readability of these lists and improve the users ability to scan quickly through the contents if you would put the method name first on each line, and put the return type second (put a " : " between the two). For example: createActions() : org.openide.util.actions.SystemAction[] rather than the current org.openide.util.actions.SystemAction[] createActions() Since the user is primarily looking for method names in these lists, please put them first. Thanks.
just now I was trying to find the superclass of a class (I would like to look at its code code), so I opened the class's "Override Methods" dialog and figured I would see all the superclasses in the first panel and from there I could find where the class lives and that would help me find it. But unfortunately, there doesn't appear to be any (class loader type) information shown about each superclass. Until we have a feature in Netbeans for jumping directly to the superclass of a selected class, it would be nice if this dialog could display that information about each superclass (or just the selected one).
Target milestone -> 3.3
Target milestone -> 3.3.1.
Cleaning up before 4.0 planning
Target milestone was changed from not determined to TBD
The UI of Override methods window was completely changed. It is now intuitive and matches most of the suggestions.