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.
Summary: | add ability to cycle through SQL history | ||
---|---|---|---|
Product: | db | Reporter: | athompson <athompson> |
Component: | Code | Assignee: | Libor Fischmeistr <lfischmeistr> |
Status: | NEW --- | ||
Severity: | normal | Keywords: | PATCH_AVAILABLE |
Priority: | P3 | ||
Version: | 7.4 | ||
Hardware: | PC | ||
OS: | Other | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Attachments: |
patch for db.core v1
patch for db.sql.editor v1 |
Description
athompson
2010-11-16 16:58:46 UTC
I really do think this is a good idea that would improve productivity. This can be added without affecting the current system, so why not let users decide which one they prefer? Also, keyboard shortcuts would be good. :) The current history options have improved, but it would still be very convenient to have a hotkey which allows you to cycle through you SQL history. Having to take your hand off of the keyboard, click the History button, and look through the dialog to find the command you want to modify or simply run again is more time consuming and breaks concentration. I reiterate that there's a reason (aside from UI format) that command prompts invariably work this way. Created attachment 149703 [details]
patch for db.core v1
The attached patch adds an API to have read-only access to the SQL history (the Set of entries and the entries themselfs are copied on access).
Created attachment 149704 [details]
patch for db.sql.editor v1
This is the second part and depends on the changes to db.core from the first patch. This patch introduces a new Action (SQLInplaceHistoryAction), that:
1. Adds a boolean property to the Document that holds the SQL-File org.netbeans.modules.db.sql.editor.ui.actions.SQLInplaceHistoryAction
2. Invokes code completion
The SQLCompletionProvider is modified to pick up the new property from the Document. If the property is present and true, a new completion code patch is invoked (and the property reset), that compares the current statement prefix with the history. If a history entry hold the same prefix it is added as a completion item. Selecting an entry replaces the current statement prefix with the selected SQL statement.
|