Changing Eclipse shortcut for Quit in Mac OS X? - eclipse

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 :)

Related

Eclipse does not confirm exit when hitting command + q

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

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.

How to disable eclipse4 built-in keyboard shortcut?

Eclipse 4.2 seem has some built-in shortcuts, such as Ctrl+P, Alt+C, Alt+X etc, you can not find them from "Window->preferences->General->Keys". I'd like to re-define these shortcuts, e.g. bind Alt+X to run maven build, but when i press Alt+X, at the bottom right corner of Eclipse, it flashes quickly and my mouse is out of control, i think this is because of shortcut conflict.
Anyone who know how to disable the built-in shortcuts? Thanks.
Edit:
Ctrl+p is only bind to one action.
When i click Ctrl+p, the bottom right corner show, this message is from from eclipse:
Well, the above is the good situation--at least you can choose which action to run. for Alt+P, Alt+c you have no chance to choose, eclipse is flipping and you are out of control.
Are you certain there isn't something in your OS or another application that is handling those keyboard triggers? If you assign a keyboard shortcut in Eclipse's Preferences, it will indicate when there is a conflict; if you don't see that, then it's not an Eclipse shortcut.
I found the root cause of this problem, i import all my keys from Eclipse 3.7 to 4.2, most of them works, however some of them conflict but Eclipse fails to show the conflict shortcuts, Let's say, Ctrl+P, this is print shortcut for eclipse by default, in eclipse 3.7 i bind Ctrl+p to another command, after import, eclipse 4.2 shows just like 3.7(see above), however in fact it still has conflict even though it does not show the conflict. I think this might be an eclipse bug. I'm the one who use shortcut extensively. Hope this help others with migrating shortcuts.

Eclipse help box

I am using Eclipse to program Android apps and I love how the little helper box thing comes up when you start to type and suggests things to you.
However, this only happens sporadically and I was wondering if there was a way to keep it visible for longer or, even better, a key combo I could press to bring it up. If I start to type something, it either helps me by suggesting things or doesn't appear.
Try Ctrl+Space. The feature is known as "content assist," "code completion," "auto-complete." In the Visual Studio world, I think it's called "Intellisense."
If you want the suggestions to appear immediately (I prefer this) you can change the delay by going to Window → Preferences → Java → Editor → Content Assist and change the Auto activation delay to 0. In my version of Eclipse (Helios for Java EE), that field is third from the bottom.
An easier way of finding this preference screen is to use the search box in the upper-left-hand corner of the prefs (as before, Window → Preferences), and typing completion. From there you can see all of the different content assist preferences that Eclipse offers. Mine has Java, JavaScript, CSS, HTML, JSP, and XML - most of those because I'm using a fancier version of Eclipse.
By default, when writing Java code, the . (period) key triggers auto-activation of content assist. You can change this setting in the same screen as the auto-activation delay.
I think its Control+Space for Code completion. Try that
Also go easy with the code completion popup delay. Dont set it to 0, i remember a strange behaviour in Eclipse where there was no popup at all.
Ctrl+Space is the shortcut for Content Assist.
Ctrl+1 is the shortcut for Quick Fix.
Ctrl+2 is the shortcut for a menu of Quick Assists. (Ctrl+2, F is the shortcut for Quick Assist - Assign to var/field, and in place of F you can also type L or R for other options.)
To see and/or modify available shortcuts you can go to Window > Preferences > General > Keys.

Eclipse Keyboard shortcuts in Mac OSX

I'm running Leopard and do all my Java development in eclipse. Some of the shortcuts work such as Command-1 which will do a quick suggest. However how do I get the Function Keys (F5 for refresh in the package explorer) to work? Right now it brings up spaces or whatever System Preferences maps to that.
What about Control-click into a breakpoint when I'm debugging and want to go directly to the chosen function? Is there a way for my eclipse keyboard shortcuts to take precedence over other programs?
i'm running eclipse 3.4 though I've had this problem since eclipse 3.2.
Its been a while since I used eclipse on the mac but I think you have to go to Preferences.app and check the "keyboard" pane. There should be an option that chooses if its Fn-function-key or just function-key for the key press. After that, it would be Fn+F5 for expose and just F5 for F5. You will lose the ability to dim the screen and adjust the sound from the keyboard.
In system preferences under keyboard there is a toggle to turn the f keys into real function keys
Are you using a macbook? In OO.org at least, you have to press fn-fx to get at the application short-cut, otherwise you get the system-wide one.
This doesn't sound like an Eclipse problem.
Are you using an External Keyboard or a macbook ?
If you want to use the debuggers and stuff, you need to change the interpretation of the function keys. You have to manually hit the FN key on your laptop keyboard. Some external keyboards have a function lock.
What about the control click and going directly to the function? That works on the windows version of eclipse, but I can't seem to get it working in Mac OSX.
Tried:
command click = nothing
option click = nothing
control click = opens context menu (like clicking the right mouse button)
You can change system level default behaviour from preferences as #sorin explained. A correction to the claim in the last sentence,
"You can use Fn-function-key to dim the screen and adjust the sound from the keyboard."
for making function keys work for external keyboards by default (and not having to push the extra fn key):
Change the default function key behavior
Choose Apple menu  > System Preferences.
Click Keyboard.
Select "Use F1, F2, etc. keys as standard function keys on external keyboards".