How can I assign a Keyboard Shortcut to "Run SQL" in RAD7 / Eclipse - eclipse

When developing in Rational Application Developer 7 I regularly run SQL queries to confirm DB state and get info for test data. I have a .SQL file with various SQL snippets in it which I use and can highlight the relevant lines I want to run. However I then have to right click with the mouse and select "Run SQL" from the menu.
There is no keyboard shortcut assigned to this command and my attempts to set one up via
Window > Preferences > General > Keys
have been unsuccessful. "Run SQL" appears under "uncategorized" rather than "Run" but attempts to assign a keyboard shortcut to it have been unsuccessful.
Has anyone else come across this issue? I can't believe I'm the only one who finds this annoying when there are so many other shortcuts set up to speed things up...

From the bug 238890 (2008), this feature has never been intended to become a full run configuration.
The user should use 'Execute Selected' context menu. The 'Run' is designed for
running stored procedures.

Related

Shortcut for selecting run configuration in Eclipse IDE

I have an Eclipse workspace with a bunch of projects. I manually created some run configurations for each project (it's necessary to pass some arguments to VM, so I can't just run it directly, e.g. using shortcut ALT+SHIFT+X, T in the specific file).
Most of the time, I just use one run configuration (whereas for the first time I manually launch it using Run -> Run configurations -> (name) -> Run). Since I configured Eclipse to always run the last run configuration (on F11 or CTRL+F11), it's usually enough.
However, sometimes I need to switch to a different run configuration and then back to previous one and then to a different one etc. Is there a quick way to do it? I'd like to see a shortcut, which would display pop-up window with all existing run configurations. By typing first few letters, I'd find an appropriate one and would be able to immediately run it by pressing ENTER. I mean something similar to what CTRL+SHIFT+T or CTRL+SHIFT+R looks like.
I'm afraid there's not something like that. Nonetheless, any advice on how to get more effective would be greatly appreciated, because I'm bored of switching run configurations via menu (as I described above). I can press ALT+R, N and then select a run configuration using arrow keys, but it's not really that comfortable.
You already gave most of the answer yourself. Start by pressing ALT+R, N and then simply start typing the name of the configuration you want. The cursor should be positioned in the filter field and thus incrementally reduce the list of launch configurations as you type. When you've narrowed it down to 1, complete the selection by ALT+R.
BTW: thanks for the reminder, I, too, was using the mouse way too much in this particular use case. I will stop doing so, now that I gave the answer :)
Since Eclipse 4.12 (June 2019, 4 years later) you can also launch any of the Run or Debug configurations available in your workspace from... the Quick Access menu (Ctrl+3 shortcut)
Note: For performance reasons, the extra Quick Access entries are only visible if the org.eclipse.debug.ui bundle was already activated by some previous action in the workbench such as editing a launch configuration, or expanding the Run As... menus.

Eclipse Run As Groovy Script by Default

I'd like to run my Groovy project in Eclipse using a shortcut (CTRL+F11). The trouble is, every time I do so I get a "Select a way to run " dialog, which gives me the choice between Groovy Console, Groovy Script, Java Application.
I've already set a Run Configuration to use Groovy Script, and if I click that Run Configuration under the Run As menu, it just runs.
How can I get my project to execute from a keyboard shortcut without that dialog popping up? I can't imagine ever selecting one of the other options.
I've never been able to get a satisfactory keyboard shortcut for Groovy script runs out of ctrl-F11. Instead I use alt-shift-X and then press G when the menu appears.
For debugging I use alt-shift-D, then G.
Both are two-stroke, rather than one-stroke, solutions, but neither one forces me to use the mouse or the arrow keys.
Under Project>Properties>Java Build Path and then click on Java SE, what ever it may be, click finish.
On the off chance that you deleted your java system library you can o pick up a new one... http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

How do I map an external tool to a hotkey in Eclipse?

In Eclipse, I have external tools defined in Eclipse that I execute regularly. I'd like to save me some time by wiring them to a hotkey. I've done some googling on this and most of the information I've found is from last decade. I'm also fully aware that I can wire a hot key to "Last executed external tool", but that last tool isn't always the same.
How do I wire an external tool defined in Eclipse to a hotkey?
I don't know if you can bind a key to this, but the PathTools eclipse plugin lets you register a set of custom command lines, which you can select from a menu. If you can bind a key to selecting it from a menu, then that works.
Maybe this could be helpful to you, http://www.eclipse.org/forums/index.php/t/88391/
Here you can possible get som help. Coute :" There currently is a command for running the last external tool
See Window>Preferences>Workbench>Keys
It is in the Run/Debug category; Run Last Launched External Tool
By default it is not mapped to a shortcut.
I have it mapped to F9"
I eventually landed on using AutoHotKey to define additional hotkeys to run external tools.
The way I do it:
In the common settings of the external tool, set the combo box of "Display in Favorites Menu - External Tools"
(optional): Organize favorites for a convenient number.
Whenever I want to invoke the tool:
press ALT (for menu bar),
then press r (for run),
then press e (for external tools),
then press the number of the favorite.
This can be done really fast. It's the closest thing to a hotkey. After 3 days you won't notice the difference...

How I can organize run configuration in Eclipse?

In Eclipse, I have organize my favorite "run configurations" but I have a lot of favorite.
So I would like to know if a plugin exists that permit to create folders or sub-lists to have a better view and organization of my run configurations.
I would like this because when I click on the "arrow" near "Run" button on the top of the Eclipse toolbar I have a very long list and it's diffuclt to find quickly the "run configuration" that I want.
I hope somebody have an idea and can help me.
Thanks.
Sincerely,
Arnaud
There are some ways to help a little bit:
If you are more interested in the last started run configurations, these get a number. Number 1 is the last, number 2 the previous before and so on.
Press ALT-SHIFT-X followed by the type of run configuration (j for Java), and you get a list of run configurations. Type in the filter box, and select by cursor keys.
Under Run > Organize Favorites ... you have the option to mark some of them as the ones you want to use often. These will listed at the top of the selection list then.
Run configurations... > Filtering Preferences... will open the preferences where you are able to define which filter should be used for the run configurations. If you use Working Sets in your programming, this could be helpful, so by switching Working Set, the run configurations come with it.
I think the keyboard shortcut is the fastest one if you want to use the run configurations all. If there is a special order, the first tip by be sufficient. If your context changes, and the run configurations should change as well, use the working sets.
I'm a bit late, however it might help future readers.
Well, if you want to manage your Run Configurations I would recommend you Eclipse Runner plugin.
I hope that helps.
I don't know of any plugin that does that, but in Eclipse the chosen run configuration if you hit the run button is the last one ran. Which is what you'll need most of the time, typically. Otherwise you can just go inside the menu, where all configurations are grouped by type and choose from there, that might take a couple more seconds but maybe is not so confusing.
One way to do it is to save the run configurations as "Stored Files" in various project directories. This doesn't require saving or loading manually, you just select "Shared file" in the "Common" tab and set it to a project directory.
When you open or close one of these "Projects" (even if that project contains nothing but run configurations) it will show/hide those configurations.
I'm currently considering creating some "Fake" projects just to hold launcher groups.

User Initiated Kernel dump in Windows XP

I remember watching a webcast from Mark Russinovich showing the sequence of keyboard keys for a user initiated kernel dump. Can somebody refresh my memory on the exact order of the keys.
Please note this is for XP.
http://psacake.com/web/jr.asp contains full instructions, and here's an excerpt:
While it may seem odd to think about purposefully causing a Blue Screen Of Death (BSOD), Microsoft includes such a provision in Windows XP. This might come in handy for testing and troubleshooting your Startup And Recovery settings, Event logging, and for demonstration purposes.
Here's how to create a BSOD:
Launch the Registry Editor (Regedit.exe).
Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters.
Go to Edit, select New | DWORD Value and name the new value CrashOnCtrlScroll.
Double-click the CrashOnCtrlScroll DWORD Value, type 1 in the Value Data textbox, and click OK.
Close the Registry Editor and restart Windows XP.
When you want to cause a BSOD, press and hold down the [Ctrl] key on the right side of your keyboard, and then tap the [ScrollLock] key twice. Now you should see the BSOD.
If your system reboots instead of displaying the BSOD, you'll have to disable the Automatically
Restart setting in the System Properties dialog box. To do so, follow these steps:
Press [Windows]-Break.
Select the Advanced tab.
Click the Settings button in the Startup And Recovery panel.
Clear the Automatically Restart check box in the System Failure panel.
Click OK twice.
Here's how you remove the BSOD configuration:
Launch the Registry Editor (Regedit.exe).
Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters.
Select the CrashOnCtrlScroll value, pull down the Edit menu, and select the Delete command.
Close the Registry Editor and restart Windows XP.
Note: Editing the registry is risky, so make sure you have a verified backup before making any changes.
And I may be wrong in assuming you want BSOD, so this is a Microsoft Page showing how to capture kernel dumps:
https://web.archive.org/web/20151014034039/https://support.microsoft.com/fr-ma/kb/316450
As far as I know, the "Create Dump" command was only added to Task Manager in Vista. The only process I know of to do this is using the adplus VBScript that comes with Debugging Tools. Short of hooking into dbghelp and programmatically doing it yourself.
You can setup the user dump tool from Microsoft with hot keys to dump a process. However, this is a user process dump, not a kernel dump...
I don't know of any keyboard short cuts, but are you looking for like in task manager, when you right click on a process and select "Create Dump"?