Status of making it easier to refresh gradle project after changing build script


(davidmichaelkarr) #1

Presently, after I make a change to my build script, I have to right-click in the Package Explorer on the “build.gradle” file or the project, select “Gradle”, and then “Refresh Gradle Project”.

For me, this is pretty frustrating. I use keyboard bindings when I can, and even configure custom ones for my preferences. I’ve attempted to bind a key to this function, but it doesn’t work.

I want to be able to do this by pressing a key from the source view, right after I’ve pressed the key to save the file.

It would be nice if it could do this automatically, but that’s a different subject.

Is this just a not-yet-implemented feature, or is there something I’m missing.


(Stefan Oehme) #2

The “Refresh Gradle Project” command should work with a key binding, just like any other command in Eclipse. Let’s narrow down why it doesn’t: Does your binding work when you select the project in the package explorer?


(davidmichaelkarr) #3

st_oehme https://discuss.gradle.org/users/st_oehme Stefan Oehme
https://discuss.gradle.org/users/st_oehme Core Dev
April 19

David_Karr:

I use keyboard bindings when I can, and even configure custom ones for my
preferences. I’ve attempted to bind a key to this function, but it doesn’t
work.

The “Refresh Gradle Project” command should work with a key binding, just
like any other command in Eclipse. Let’s narrow down why it doesn’t: Does
your binding work when you select the project in the package explorer?

Yes, if I first use the mouse to click on the project name in the Package
Explorer, then my key binding refreshes the Gradle project. The key binding
does nothing from the source view. In my key binding, I use a prefix that
I use for other bindings that work fine, and the “When” is set to “In
Windows”.