Code Navigator - Improvements

Author: Jindrich Dinga
Version: First draft
Last update: 09/20/05

Content

  1. Introduction
  2. Mnemonic
  3. Contextual menu
  4. Quick filter
  5. Java class
    1. Inheritance views
    2. Inner classes
  6. Others
    1. Changing the tool tip of slide activator
    2. Message for unsupported documents
    3. "Show inherited members" toggle button in Members view
    4. Filters
  7. Open issues
    1. Tool tip with Javadoc
    2. Moving of Caret Row
    3. D'n'D function
    4. Projects and Files view
    5. Slide activator

1. Introduction

This piece of document describes differences between UI spec and implementation of Navigator. Here are also mentioned some open issues, which are tightly tied with Navigator.

In addition to that, there is also proposal to change Navigator name to Inspector (this name is already used in this spec). This new name is more appropriate for window which will provide information about Projects, Files and almost all documents used in the IDE. The Inspector is Context sensitive.

Other related links:

  1. UI specification
  2. Another supported documents

2. Mnemonic

Comment: Depends on if Inspector (Form Editor) is merged with Navigator or not. Otherwise the mnemonic will not be changed.

Because of changing the name from Navigator to Inspector, the mnemonic must be changed to probably "I", but TBD. The shortcut and placement of the menu item stays same in the Window menu.

3. Contextual menu

These menu items should be available in the contextual menu.

1. Override action
2. Find Usages action
3. Refactoring actions
4. Other actions

- Copy (Ctrl+C) - copies a selected member to the Inspector window as well as to the Editor window. The copied member has same name and number (copied_member_1)
- Cut (Ctrl+X) - cuts a selected member and puts it to the clipboard.
- Paste (Ctrl+V) - pastes a selected member to the Inspector window as well as to the Editor window.
- Delete (Delete) - deletes a selected member.

4. Quick filter

In this version of Inspector the Quick filter will be implemented: by typing a letter the quick filter will search for the members which start with the same letter and reduce the tree, all nodes will be expanded. Users can move between the results by using Up/Down arrows (only matched String can get focus). On Enter, the appropriate document is opened and selected member is displayed in the Source Editor.

Quick filter (see figure 1) can be cancelled by pressing ESC, after canceling the filter, all members are displayed in the Inspector again.



figure 1
- Position and appearance of Quick filter

In Quick filter, there is also possible to use asterisk (e.g. *system) in case the user does not remember the exact name of a member.

5. Java class

5.1. Inheritance views

Two views for Inheritance view are available. The tree has root node (name of the class/inner class) and other nodes are expanded to the first level by default, other levels stay collapsed (see figure 2). Actions for Inheritance view are added (Show supertype/subtype hierarchy). If a class contains interfaces, these interfaces are displayed in the tree as well. A node can be collapsed by left arrow, expanded by right arrow, on Enter the appropriate document is opened and the member, which got focus, is selected in the Source Editor. Up/Down arrow is used for moving within the list.

look from subclass to -> super class
look from super class to -> subclass

figure 2
- Inheritance views

For downloading the icons, please click here.

Contextual menu


figure 3
- Contextual menu for Inheritance view on Mac L&F

If the "Override" action is not valid, this action is disabled.

5.2. Inner classes

When somebody inserts a inner class in the middle of code, situation when they cannot distinguish which members are from which class (inner or main) can appear. Because of this issue it was decided to use tree structure, where root node is not displayed. The inner classes are expanded to the first level by default. Other levels of inner classes stay collapsed (see figure 4). A node can be collapsed by left arrow, expanded by right arrow, on Enter the appropriate document is opened and the member, which got focus, is selected in the Source Editor. Up/Down arrow is used for moving within the list.

Code Order view
Alphabetical Order view

figure 4 - new appearance of Inspector, when inner classes are used

Note: When two classes are placed in one file, root node is displayed.

Filters and actions (to download the icons, please click here) are distinguished by placing a separator between them.

Contextual menu

figure 5 - Contextual menu for Members view on Mac L&F

If the "Create Javadoc" action is not valid, this action is disabled.

6. Others

6.1. Changing the tool tip of slide activator

Comment: The tool tip can be changed, however be aware of "Inspector" name.

This tool tip should be changed to "Click or press Ctrl-T to hide/show when Inspector is active".

6.2. Message for unsupported documents

For these kind of documents, the Inspector should display this message: < No views available >

6.3. "Show inherited members" toggle button in Members view

It was decided to get rid of this action, because same action is available in Inheritance view (see inheritance view).

6.4. Filters

  1. Inspector must remember last filter settings (which filters are disabled/enabled).
  2. In the "bottom toolbar", there will not be the name "Filters".

7. Open issues

7.1. Tool tip with Javadoc

In the current state of Inspector, if a member has Javadoc, this Javadoc is displayed as a tool tip. Displaying Javadoc as a tool tip causes these problems:

  1. the tool tip can have same height as the height of screen resolution - on Windows XP platform, if the task bar is visible the tool tip is sometimes displayed behind the task bar, so user cannot see whole Javadoc
  • possible solution is that tool tip will not exceed borders of IDE (in that case we should add a scroll bar for longer Javadoc than is the height of IDE resolution)
  • if a tool tip is empty, a pixel dot appears
  • as it was mentioned in the first point, the tool tip can have same height as the height of screen resolution
    • use smaller component and scroll bar will appear (a user can see all Javadoc)
    • use smaller component and display just few rows, if Javadoc is interesting, user can double click on a member and it will display the appropriate member (a user can see just few first rows of Javadoc)
  • a user cannot interact with Javadoc
  • So that is why we should consider about using/creating old/new component for members which have Javadoc.

    Tim Boudreau's suggestion how to solve this issue: "Just use a JLabel or similar + PopupFactory and a mouse listener, and you can do whatever you want in the background and get rid of the 1px box (and also do a maximum size + scrollbar or whatever). Similar to what the editor does w/ code completion.".

    7.2. Moving of Caret Row

    We should consider, if it is necessary to support this feature (single click on a member in Inspector window causes moving the Caret Row in Editor) in the Inspector. This feature is not implemented because of possible inconsistency between special cases of xml files (web.xml and ejb-jar.xml files) and other documents. To see proposal for supporting other documents, click here.

    Note: As it was already mentioned in the previous UI spec, when a member has focus in Inspector window the Caret Row is moved to the line which contains the chosen member in Source Editor. Of course, there should be some delay between moving the Caret row in Source Editor (e.g. when user moves between members by using arrows in Inspector window, the Source Editor should not scroll immediately).

    The Caret Row is displayed on the 5th line from the top of the Editor window.

    7.3. D'n'D function

    The question is have or not to have the drag'n'drop function in the Inspector. The main idea of Inspector is to inspect own or foreign code. Moving e.g. methods within a code can be easily done in the Source Editor. Of course, it is nice to have this function in the Inspector, however we do not know if the users are using this feature or not. To know that it was decided to get rid of this function from Inspector.

    Apart from this, we have to state that drag'n'drop function should be available in Members Code order view only and its appearance should be the same as D'n'D action in Project view.

    7.4. Projects and Files view

    We should consider about cooperation of Inspector with Project and Files view. These two views can be "cut" behind the documents, so their members are directly shown in the Inspector (see figure 6). The members displayed in Inspector are sorted alphabetically in this order: Methods, Fields, Constructors and Bean Patterns. For Files view, the Inspector will also display members of compiled class.

    Projects view
    Files view

    figure 6 - cooperation of Inspector with Projects and Files view

    Note: Filters - TBD

    7.5. Slide activator

    We should investigate, whether the users are invoking actions (e.g. Sort by Name, Sort by Source, etc.) or changing filters (e.g. Show Fields, Show Static Fields and Methods, etc.) from the "bottom toolbar" often or not. Based on this results it is possible to decide whether we should get rid of the slide activator and keep the "bottom toolbar" or get rid of the whole "bottom toolbar".

    Project Features

    About this Project

    ui was started in November 2009, is owned by Jiří Kovalský, and has 44 members.
    By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20160708.bf2ac18). © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
     
     
    Close
    loading
    Please Confirm
    Close