-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add keyboard shortcuts and menu items to run tests in debug mode #204
Conversation
Can you review your PR to only contain the desired commit ? |
Sorry, will do. Did an update to master on my fork after submitting the PR and wasn't aware how it would affect the PR... |
Ctrl+Alt-D Runs all tests in the current class in debug mode Ctrl+Alt+Shift-D Runs test of selected member in debug mode MoreUnit#43
done |
@dstango please be aware this is not cross platform compatible. You could fix that by replacing the ctrl, alt, shift modifier keys by the meta keys that eclipse defines for this (or by having even different key shortcuts for MacOS, and a platform filter on the keybinding). See https://help.eclipse.org/latest/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fextension-points%2Forg_eclipse_ui_bindings.html, which says
|
@Bananeweizen thanks for making me aware of that. Unfortunately I have no MacOS experience to make a competent judgement what a proper fix would look like. Besides that I was just following the pattern of the the other keystrokes already defined ... (with the exception of "show view", which is defined as SHIFT+ALT+Q M [Windows], respectively Command+Option+Q M [Mac]). So it looks to me, all shortcuts might be in conflict with expectations of Mac users, and would need fixing then, not only my new key bindings. Unfortunately I have no experience with MacOS, and no idea what proper key bindings would be, that would satisfy a Mac-user's expectation. Thus I propose you might open a new issue addressing this general topic, which includes the concrete changes to the keys you propose for each command. I'd then be happy to provide a new PR with the changes you propose. |
Sorry for the late response. I also can't say what would be a good or typical fit for Mac users, and that's not what I'm trying to fix. I'm rather saying that by just replacing the key combination Ctrl-Alt-D as M1-M3-D (and similar) it would become usable on Mac already (and remain the same as before for the other operating systems). I don't say you should come up with secondary key combinations for Mac. |
@Bananeweizen Thanks for your response. I checked and read the eclipse link you provided again. I see the following aspects to consider:
Of course we could "just do it" -- yet I'd be more happy to have some input from a Mac user. |
Okay, I had not noticed that detail for the Control key. Since I don't have a Mac, it's rather theoretical knowledge on my side, too. I'm okay with only doing something, if we get feedback from a Mac user. |
Two new actions to resolve #43
Ctrl+Alt-D
Runs all tests of the current class in debug modeCtrl+Alt+Shift-D
Runs test of selected member in debug modeThis PR resolves the issue by adding two new actions/shortcuts instead of a configurable option in the preferences dialog (see discussion in issue). Reasoning: this way offers more flexibility to various user needs, as it allows easy on the fly switching between "run" and "debug" as needed. People who only ever want to use the new debug variant can do so by configuring the keyboard assignments to their likings.
I'm unsure if these default keys are good choices, or might conflict with other well known plugins that I'm unaware off. (Or prevent easy remembering ;-) ...)