Author: Ondrej Langr
$Id: new_file_context_menu.html,v 1.1 2007/02/05 11:09:49 ondrej Exp $ (see full CVS history)
The contemporary submenu in New context menu appearing when a user right-clicks the project or it's folder in Projects Window (see figure below) has proved not to follow the task flow of a user willing to add a particular type of file. Users have problems understanding and using the File/Folder... menu item if they do not find the desired file in the menu. This specification draft proposes a redesign of this menu.
This problem is also described in the issue 68232.
Figure 1. Appearance of the context menu in NetBeans 5.5
Since the user always reads the menu from top to bottom when searching for the particular item, the last option that allows adding any type of file should be at the bottom.
Figure 2. New proposed menu (please notice that items above the vertical separator are dynamically generated)
The number of menu items should be at most 10. However, by default, after a clean installation there can be as few as only two or three files (e.g. Java Package, Java Class and Folder).
Due to existance of various packs, NetBeans is not used exclusively for Java development and there can be a wide range of file types. Which ones are the most commonly used highly depends on developer's specialization and position in a team. Therefore, we are not able to give a static selection of generally most used file types, the New ... menu should by dynamic instead.
Current state (NetBeans 5.5):
The New menu items are currently bound to a project type, though not too strictly. To be specific, if a file is added in a project, it increases its rating in all other projects where this type of file can also be added. There are no data available mapping the typical usage patterns of file types, but I believe this is very appropriate and should be left as it is. In other words, when a user often adds file type x in a project, she is more likely to want to add the filetype x into other types of project where it makes sense. The rating is set so that the last added file has the highest ranking and is put on the top of the New menu.
The optimal algorithm to dynamically reorganize recently added types of files should, from user's point of view, satisfy following requirements:
The menu context should not only reflect files added through this menu, but also files added via the File | New File... main menu item and through the main toolbar icon.
Any algorithm complying with the requirements above can be used. The current (putting the last added type of file on the top of the menu) has some drawbacks, but no better algorithm was proposed yet, so the "old" one should be used.
Figure 3. Current state (NetBeans 5.5) VS the proposed menu (please notice that in either case most menu items are dynamically generated).
There has been a lot of discussion on the algorithm to dynamically generate the menu content. The current algorithm has some drawbacks, but no better way was found yet. Any proposals are welcome!