EditorBookmarks72
(added date and authors) |
(New bookmark creation by non yet assigned Ctrl+J [0-9a-z] shortcut.) |
||
Line 53: | Line 53: | ||
* '''Ctrl+Shift+Comma''' and '''Ctrl+Shift+Period''' semantics would be changed to navigate in Bookmarks History which would be similar to Jump List navigation (or a browser navigation history). A bookmark would be added to bookmark history when it gets created (by toggling) or when it's navigated explicitly (by "Ctrl+J then [0-9a-z]"). | * '''Ctrl+Shift+Comma''' and '''Ctrl+Shift+Period''' semantics would be changed to navigate in Bookmarks History which would be similar to Jump List navigation (or a browser navigation history). A bookmark would be added to bookmark history when it gets created (by toggling) or when it's navigated explicitly (by "Ctrl+J then [0-9a-z]"). | ||
* '''Ctrl+Shift+J''' (currently an unoccupied shortcut) would show Bookmark Manager dialog. | * '''Ctrl+Shift+J''' (currently an unoccupied shortcut) would show Bookmark Manager dialog. | ||
- | * '''Ctrl+J then [0-9a-z]''' would navigate to a concrete bookmark. | + | * '''Ctrl+J then [0-9a-z]''' would navigate to a concrete bookmark. If no bookmark is assigned to the shortcut yet then a dialog would be displayed allowing a new bookmark creation. |
== Conflicts == | == Conflicts == |
Revision as of 16:02, 21 February 2012
Date: 21 FEB 2012 Author: Miloslav Metelka, Petr Somol
Contents |
Editor Bookmarks Support in NetBeans
Introduction - Current State
Existing bookmarks support in NetBeans consists of three shortcuts:
- Ctrl+Shift+M for Toggle Bookmark on current line in the currently focused document
- Ctrl+Shift+Comma and Ctrl+Shift+Period for cycling through bookmarks back/forward in a currently focused document. The choice of these particular shortcuts is good from UEX point of view because the respective keys carry the symbols < and >, what visually underpins the respective cycling directions.
At the moment bookmark navigation is limited to a single file only. Bookmarks are unnamed. Any number of bookmarks can be set in each file, but no shortcuts to access particular bookmarks are provided, nor it is possible to cycle across file borders. There is no view/window available to get an overview over all existing bookmarks.
Bookmarks Storage
Bookmarks are physically stored in private.properties file inside a project in which the particular source file with the bookmark resides. This is generally a desirable approach however it means that the IDE always works with bookmarks from currently opened projects only.
Use-Cases and Scenarios To Be Addressed
Navigation Across Files
Users need to navigate through bookmarks across files. Since a global list of bookmarks can become large it is desirable to have more navigation options than just cycle through previous/next bookmark.
Named Bookmarks
Some users demand to create named bookmarks which many editors support. But they also want to retain unnamed bookmarks which are faster to create and work with.
Bookmark Management
Users need to see a list of all bookmarks in a window (similarly like e.g. a list of all breakpoints). Bookmark window will enable quick navigation. Possibly it would provide also other bookmark management actions: various modes of view sorting/grouping (by name, by file, by project), renaming, search by name, enabling/disabling, adding/removing.
Bookmark Improvements Proposed for NetBeans 7.2
Updated Bookmark's Definition
In addition to the current properties of a bookmark (which is a source-file and line-number) the bookmark would newly have a name ("bookmark1", "bookmark2" etc. for unnamed bookmarks) and a shortcut consisting of a prefix shortcut Ctrl+J followed by a digit or [a-z].
Bookmark Manager
A Bookmark Manager dialog would show all the known bookmarks (from all currently opened projects). On the left there would be a table showing each bookmark's properties: name, shortcut, source-file:line-number (tooltip would show full source path). On the right there would be a preview of the code where the bookmark is located. If a new bookmark was created by Ctrl+Shift+M the dialog would preselect it when invoked so that the user can easily turn the recently created unnamed bookmark to a named one.
Updated navigation
- Ctrl+Shift+M would toggle (an unnamed) bookmark on a current line. Possibly a warning dialog could be shown when removing a named bookmark (no warning for an unnamed bookmark).
- Ctrl+Shift+Comma and Ctrl+Shift+Period semantics would be changed to navigate in Bookmarks History which would be similar to Jump List navigation (or a browser navigation history). A bookmark would be added to bookmark history when it gets created (by toggling) or when it's navigated explicitly (by "Ctrl+J then [0-9a-z]").
- Ctrl+Shift+J (currently an unoccupied shortcut) would show Bookmark Manager dialog.
- Ctrl+J then [0-9a-z] would navigate to a concrete bookmark. If no bookmark is assigned to the shortcut yet then a dialog would be displayed allowing a new bookmark creation.
Conflicts
Since bookmarks are stored on a per-project basis a conflict in name and shortcut may arise. Bookmark Manager dialog would warn about both conflicting name and/or shortcut by showing them in red in the table (tooltip would show conflicting bookmark description). When shortcuts would conflict the navigation would choose the bookmark from a project opened sooner.