Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to limit BuildShip (gradle eclipse) integrated functionality?

Now that I am using gradle for all of my new development, I'm running into issues with BuildShip features I really don't want.

For instance, when I hit the Run hotkey when I have a unit test open in Eclipse, I only want it to run as a JUnit test, alone. But Gradle has inserted its own hooks and option, which means extra clicking or keypresses beyond the one-stroke hotkey I have assigned to Run that I can tell it I want JUnit. (The gradle test option actually runs all tests, which takes minutes.).

Question: Is there a way to remove this hook in gradle without diving into the source code and ripping out functionality myself?

This isn't the only interference (interfering with run last is another), but it's my #1 annoyance about BuildShip.

"run as"

Essentially, I want this popup to stop happening.

like image 467
Alice Young Avatar asked Apr 18 '16 16:04

Alice Young


1 Answers

Indeed you cannot change the available launchers prompt but you can change the default hotkeys related to each launcher and directly use the one you prefer.

From Windows > Preferences > General > Editor > Keys you can get the list of available hot-key mappings. Filter the (long) list by typing test as show below:

enter image description here

As you can see you have several mappings for running JUnit tests: Gradle, JUnit runner, Maven.

The default configuration for JUnit runner is Alt+Shift+X,T, not really user friendly I would say.

I changed it to a more concise Alt+U down in the Binding option and applied the changes. Now you can run any JUnit test on its open editor windows without any prompt, simply type Alt+U and the JUnit runner will be triggered automatically for that single unit test.

like image 137
A_Di-Matteo Avatar answered Nov 14 '22 22:11

A_Di-Matteo