-
Notifications
You must be signed in to change notification settings - Fork 165
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
Use code mining to allow user to update the classpath via the Gradle editor #712
Comments
What does inline mean? What is "code mining" in this context? I can't really tell from the screenshot. Maybe a screencast would help? |
Ah, sorry, I assume everyone knows about the Eclipse 4.8 code mining API. Code mining is called code lenses in VSCode and allow to enhance the source code with additional information. In the above screenshot Set as Active Target Platform is not part of the source file, it is added as additional information and action which (should) allow to active the target platform. Other, more complex examples are code mining for JDT, see https://github.com/angelozerr/jdt-codemining which contain a lot of animated gifs. The Gerrit from above should give you a hint how to implement this, if desired. |
Got it, thanks! That looks useful indeed. Would be a great community contribution. |
@oehme I could contribute the code mining without the specific Gradle logic. Would that be helpful? I guess it will be easy for you to add the buildship specific logic and it (should be) easy for me to add the code mining header annotation. |
@donat WDYT? |
Makes sense to me. Regarding the specification, you would add this code mining features for all The Buildship-specific part is really simple; you can call ProjectSynchronizer.execute() to start the synchronization from the UI. Nonetheless, if you provide the skeleton, I can add it there. The build script needs adjustments anyway: as the related code needs to be compiled only for Eclipse 4.8+, whereas currently, we compile all sources for Eclipse Kepler and above. |
Today Donat and I implemented this as a prototyp on EclipseCon.
Donát Csikós <notifications@github.com> schrieb am Mi., 17. Okt. 2018,
14:23:
… Makes sense to me.
Regarding the specification, you would add this code mining features for
all .gradle and .gradle.kts files, right? Can we display the UI
contribution only for files located in Gradle projects?
The Buildship-specific part is really simple; you can call
ProjectSynchronizer.execute() to start the synchronization from the UI.
Nonetheless, if you provide the skeleton, I can add it there. The build
script needs adjustments anyway: as the related code needs to be compiled
only for Eclipse 4.8+, whereas currently, we compile all sources for
Eclipse Kepler and above.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#712 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAIihi4MiKz_Bjh8DUKedOvONDXv1LVmks5ulyEwgaJpZM4VAnF0>
.
|
FFR I pushed the prototype to the |
Any plans to release that?
Am Mo., 29. Okt. 2018, 10:41 hat Donát Csikós <notifications@github.com>
geschrieben:
… FFR the prototype is pushed to the donat/code-mining/prototype
<https://github.com/eclipse/buildship/tree/donat/code-mining/prototype>
branch.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#712 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAIihhednWJc89DBuWs6qER-uBSTZD2cks5ups1igaJpZM4VAnF0>
.
|
@vogella I've cleaned up the prototype code and created a new PR from it. There are a couple of things which need to be sorted out before we can merge this:
|
If a user edits the build.gradle file he can update the classpath via right-mouse click. It would be nice if this can be done inline. For example, for the target editor I'm working to allow its activation via the text editor and code mining.
The related code changes can be found here: https://git.eclipse.org/r/#/c/125149/
It is relatively simple to provide this (see Gerrit) and I think Gradle users would benefit from this.
The text was updated successfully, but these errors were encountered: