Eclipse does not confirm exit when hitting command + q - eclipse

I generally close tabs while using Eclipse with command+w, however, sometimes hit command+q by mistake. Even though I have Eclipse set-up to warn me when exiting (Preferences -> General -> Start-up and Shutdown, "Confirm exit when closing last window"), this shortcut seems to bypass the warning, which is quite annoying.
Is there a solution to this same as the way Chrome presents a warning when hitting this shortcut? A hack in some plist file maybe? Google searches have not helped much.

OK, so having the same problem with Safari and doing a google search led me to this Apple discussions page. Basically following these steps (via #evenhuis) you can re-map the quit shortcut to any other menu function:
Go to System Preference > Keyboard.
Choose Keyboard Shortcuts
Click Application Shortcuts
Press the + button
Under Application choose Eclipse
For Menu Title input "Show All". (You could use some
other innocuous menu option here)
For Short Cut use ⌘Q

Related

Changing Eclipse shortcut for Quit in Mac OS X?

Like other Mac OS X applications, Eclipse has a shortcut to quit itself, Cmd+Q. Although this provides a consistent UX, it's very annoying. Since one of the most frequently used shortcut is Cmd+1, which is for quick-fix, 1 and Q are located too close, and I mistakenly hit Cmd+Q instead of Cmd+1 very often. And this makes me crazy.
I tried to find the binding in Preferences Dialog > General > Keys to change the shortcut, however, I couldn't.
Is there any way to change the shortcut for Quit Eclipse to other keystroke? Or any tip for avoid this inconvenience?
In Chrome, there's an option to prevent this kind of mistake. By enabling Warn Before Quitting, we have to hit Cmd+Q twice to quit the browser. I think this is cool. How can I introduce similar feature to Eclipse?
So it is possible to change OSX shortcuts from the System Preferences panel:
Go to System Preferences > Keyboard > Shortcuts > App Shortcuts. Then click the + button. Choose 'eclipse' as your application (it might be possible that you have to search for the application in "Other..."). The menu title has to be exactly "Quit Eclipse" and enter a new shortcut. Click add, and you're all set.
If you have any more questions, please shoot :)

Is there a keyboard shortcut for stopping the current console in Eclipse?

I'm developping a Java application with a class containing main. I can start the application using Ctrl+Alt+X J subsequently the application can be re-run by hitting Alt+R T Enter to choose the menu option for the first item in the Run history.
But to stop the application, I have to click on the small red square in the console view. This is annoying, because it forces me to use the mouse, type Alt+R T Enter then re-focus the editor using the mouse again.
Eclipse being so configurable, there must be a keyboard shortcut to stop the application run in the current console I haven't found. There are an entry in Window > Preferences > Keys called Terminate and Terminate and Relaunch but no matter what binding I assign or what when conditions I set and no matter if I use the Debug perspective or not, they don't seem to fire.
Please help an Eclipse newbie avoiding the mouse :)
Go to Preferences -> General -> Keys
Find "Terminate" Set your binding to whatever you want.
Then change "When" from "Debugging" to "Editing Java Source".

Eclipse on Mac OS X : Shortcuts are broken

I'm pretty new to Eclipse because I'm starting to learn Java Programming. I'm having problem with the editor.
I'm running Eclipse on an iMac with a German keyboard. The keyboard shortcut for "Redo" action is Cmd+Shift+Z.
When I use this shortcut, a tiny window in the right down corner pops up and asks if I want "Inspect" or "Redo"...
In the preferences, I have three different "Inspect", (just one was with a shortcut, but it was something like Cmd+Shift+I). Anyway, I erased it to be sure.
Afterwards I tried again, but the same little window asks me for Insect or Redo. Now I don't know what to do.
I'm having the same problem with Cmd+R ("Run" action). For "Run" there is another keyboard binding.
In Eclipse preferences, I could not find both commands that are on the same shortcuts. Or better I found them but they are separate.
Go to the Keyboard shortcuts preferences :
Eclipse > Preferences > General > Keys
and unbind or rebind whatever is giving you trouble.
In your case, go to Inspect and remove the binding for Cmd+Shift+Z.
In some cases, removing the binding for a key command will remove all bindings for it so after you do so, check out Redo and make sure it is still tied to the command.

Keyboard shortcut to switch focus from web developer tools to page in Chrome on Mac

This question is directly related to following existing question with different tag:
Keyboard shortcut to switch focus from web developer tools to page in Chrome
As stated in the title, is there anyway we can switch focus from web developer tools to page in Chrome on Mac OSX.
I looked up online, and at Chrome Dev. doc and help forum, nothing there but they pointed to SO for an answer. Here are some links regarding this question, I already found useless:
https://developers.google.com/chrome-developer-tools/docs/shortcuts
https://groups.google.com/forum/?fromgroups#!topic/google-chrome-developer-tools
Press F6 three times. To go back to DevTools press F6 one time.
F6 loop the focus in this order:
Page
DevTools(if DevTools is open)
Address bar
Bookmarks
You can move focus to the address bar with "Cmd + L". If you put javascript: in the address bar and hit the enter key, you can switch the focus to the page.
But javascript: is too long, isn't it? Then follow this.
Go to Chrome Settings page (Cmd + ,)
Click "Manage search engines..." in the Search section
Add a new search engine with
any name e.g. Back to page
any keyword e.g. j
URL - javascript:
Now you can move focus to the page only with j.
If you've un-docked dev-tools, on a Mac use Cmd+` (backtick) to move focus to active or next window.
This keyboard shortcut can be found and customized at:
System preferences -> Keyboard -> Shortcuts -> Select "Keyboard" category
I've had this exact same use case, and I'm surprised there isn't a simple shortcut for it. I've done some research, and it seems there are a few options:
Use command + option + J to toggle the console off. This will bring focus back to the web page. Then, hitting command + option + J again will open the console and direct the focus there once again. This is probably not the best way since there is a little bit of on each toggle.
Open Dev Tools in separate window. You can find this by clicking the three dots in the top right corner of the dev tools, and then you can find a button for undocking the tools into a separate window. Then, to toggle focus between the web page and console, you can hit command + `.
The answer above from #Sangdol is a great solution for switching focus from the console to the web page. This is probably the fastest and best way of doing this once it's set up. The only thing I'd like to add is how to switch focus back to the console. For this, you can hit command + shift + C twice (hitting it only one will successfully switch the focus, but will leave the browser in 'Inspect Element' mode). I've found that if the focus on the webpage is in a text box, you may have to hit Esc first before hitting command + shift + C.
Press ⌘+L to go to address bar.
Press Esc.
You have now switched focus from web developer tools to page.
To switch back press focus back press ⌘+⌥+C.
This works for docked but is best for undocked dev tools and multiple windows/tabs.
 
With devtools focused hit ⌘+Shift+P
start typing in Debuggee
Hit enter when you see Focus debuggee, done! 
 
Then to go back to dev tools just hit ⌘+⌥+J to focus back on the tab you left them.
 
It saves me some time everyday - my tabs can grow on me over the day... or days... weeks - pretty sure you've all been there - R&D!
New Update: In chrome Version 92.0.4515.131.
When DevTools is open and focus.
Press (⌘ Command+⌥ Option+↓ Down) Twice.
First time pressed - the focus will transfer to the URL.
The second time pressed - the focus will transfer to the page.
OS X 10.8.3 - Mountain Lion
customize "Move focus to next window in application" short cut, because the default key map is "Command + F1", which is binded to show "Shortcuts for Developer Tools" on chrome.
Update in chrome 107
You can now customize keyboard shortcuts for commands in DevTools.
Go to DevTools Settings > Shortcuts > set shortcut for "Focus debuggee".
Hitting ⌘+⌥+J twice will hide the dev tools and focus on your actual window. Do you want to focus on window without hiding dev tools?

Netbeans keyboard shortcut for navigating to next error marker in editor

Is there any keyboard shortcut key for navigating to the next error (red markers created in error stripe) in Netbeans editor?
As of NetBeans 8 there doesn't appear to be a way to navigate through errors exclusively in the editor. If you look at tools->options->keymap an action does exist for this (next error in editor), but the shortcut is blank. I set it to Alt+E on my IDE, this will navigate through all annotations - not just errors. So if you don't mind cycling through all hints, warnings errors, etc, this will work.
The closest I've been able to get for navigating specifically through errors is using the action items window. Add a filter for errors, then you can use Ctrl+. and Ctrl+, to navigate through the list (see How to display all compile errors in Netbeans as a task list?).
That would be Ctrl-Period ::: (Period means .)
Links to many shortcuts:
Highlights of NetBeans IDE 8.0 Keyboard Shortcuts & Code
Templates
134 Shortcuts for NetBeans 8 (Windows)
EDITED--URLs NOW VALID thru ver. 8
Add the Action Items window to your IDE. This lists all of your errors and is dynamic, so will be updated when you save.
From the menu bar: Window->Action Items.
(Took me forever to understand why when I would save, I wouldn't see any compile errors, but then it wouldn't run.)
Actually question is about "next error in editor". At least in my configuration (NetBeans profile) this function doesn't have any shortcut by default so if you go to Tools->Options->Keymap and in search field you write "Next Error in Editor" you can add any shortcut that fits the best to you
On a Mac things are different and there is no keyboard shortcut for navigating to a usage/compile error as far as I can tell.
You can go to Help -> Keyboard Shortcuts Card to see the full list of short cuts for your platform.
See https://netbeans.org/kb/articles/mac.html for info for macs and https://usersguide.netbeans.org/shortcuts.pdf for the default shortcuts for PCs.
No. there is no good and easy way on keyboard.
just clicking on those red marks (by mouse) is the fastest way. (it's not an easy/good way. but the best possible.)