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.

Bug 86878 - Keyboard Shortcut for "Run Selection"
Summary: Keyboard Shortcut for "Run Selection"
Status: RESOLVED INVALID
Alias: None
Product: db
Classification: Unclassified
Component: SQL Editor (show other bugs)
Version: 7.1.1
Hardware: All Windows 7
: P2 blocker (vote)
Assignee: Jiri Rechtacek
URL:
Keywords:
: 157096 (view as bug list)
Depends on:
Blocks: 152817
  Show dependency tree
 
Reported: 2006-10-10 17:38 UTC by asleson
Modified: 2012-04-25 15:51 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description asleson 2006-10-10 17:38:41 UTC
The SQL editor in NetBeans 5.5 now supports the functionality where I can
highlight a single SQL statement and right-click and choose "Run Selection" to
run the selected SQL statement.  This is a great addition.

Can a keyboard shortcut be added for this?  I typically use the keyboard as much
as possible and avoid the mouse.  It would be nice if the existing Ctrl+Shift+E
shortcut would recognize when a text was highlighted and run only the selected text.
Comment 1 Andrei Badea 2006-10-13 14:54:12 UTC
Will try to implement 6.0.
Comment 2 sansan 2008-11-26 13:16:56 UTC
I think it is an VERY useful feature when the existing Ctrl+Shift+E shortcut would recognize when a text was 
highlighted and run only the selected text. The separate action "Run selection" is not a common practice.

See doc of MS SQL Sever Managment Studio:
"If a part of the code is selected, only that part is executed. If no 
code is selected, all the code in the Query Editor is executed."

See doc of DBVisualizer:
"If you select a statement in the SQL editor and choose SQL->Execute, 
only the selected statement is executed. This is a useful feature when 
you have several SQL statements are in the SQL editor and you just want 
to execute one or a few of the statements."
Comment 3 David Vancouvering 2008-11-26 16:40:12 UTC
Andreas (aka sansan) - do you want to work on this?  If so, please assign to yourself and mark as "Started"
Comment 4 Jiri Rechtacek 2009-10-16 14:00:52 UTC
Reassigned to new owner.
Comment 5 Jiri Rechtacek 2009-10-23 09:42:52 UTC
*** Issue 157096 has been marked as a duplicate of this issue. ***
Comment 6 matthias42 2012-03-03 15:52:42 UTC
Go to menu "Tools -> Options", select keymap and search for "Run SQL Selection". After that you can assign a short cut to this action.
Comment 7 ericrbs 2012-04-24 20:36:34 UTC
The Oracle SQL Developer has an nice shortcut to run the statement.

If you press Ctrl + Enter this run the first statement in the line.

This is easier and faster than select the statement that I want to run.

I didn't find this feature, so I'm reopening the bug.
Comment 8 matthias42 2012-04-25 15:51:33 UTC
Please try following the advice in comment #6. If there is no selection, the statement the cursor is in, is executed, if there is a selection, the selection gets executed.

If you think this is not what you want, please open another  bug, as the root cause of this bug is fixed.