20

I installed STS plugin which include a Gradle IDE, but it seems not helping much.

enter image description here

ADD 1

The effect with Buildship Gradle Integration's Gradle Build Script Editor:

enter image description here

smwikipedia
  • 52,824
  • 76
  • 267
  • 432
  • 2
    Eclipse buildship now has this in version 2.2.0+, use an update site as instructed on their github. https://github.com/eclipse/buildship/blob/master/docs/user/Installation.md#installing-from-eclipseorg-update-site – d_scalzi Dec 21 '17 at 00:20

6 Answers6

10

I use Groovy editor from Groovy-Eclipse plugin to edit Gradle files. Since Gradle is basically Groovy it works very well. The plugin is available in the Eclipse Marketplace and GitHub.

Buildship does not support source highlighting and probably never will due to planned transition from Groovy to Kotlin.

There is the following post in their forum: "this is planned to be supported by Buildship at some point in the future. But, we do not have this on our immediate road map".

Sergey
  • 2,557
  • 1
  • 27
  • 49
  • You should installed it not from the Marketplace, but from the update website: https://github.com/groovy/groovy-eclipse/wiki#releases – Dime Jun 21 '17 at 07:36
5

Use EGradle editor plugin - supports Syntax highlighting, code completion, error handling, and tool tip.

Install this plugin from market place:

https://marketplace.eclipse.org/content/egradle-editor

Ianrakisa
  • 51
  • 1
  • 3
2

Try installing this as an alternative: http://marketplace.eclipse.org/content/nodeclipseenide-gradle-eclipse

It's for highlighting the gradle build file text. It's different from Groovy Eclipse plugin highlighting

aboyko
  • 1,317
  • 1
  • 9
  • 10
2

It seems as if buildship does not plan to provide better editor-support for groovy-gradle.

According to this (closed as wontfix) buildship-bugzilla-bug the .gradle editor support is currently not planned.

Quote from mentioned above bug

[...]Actually, we have no plans for providing editor support for the current Groovy DSL, because groovy-eclipse is essentially unmaintained.

We will provide integration with the Kotlin Eclipse plugin, since Kotlin will be the future preferred language for Gradle build scripts.[...]

Daniel
  • 113
  • 1
  • 7
1

Editor from the Groovy-Eclipse plugin does not seem to be much of help for gradle scripts. I would recommend http://marketplace.eclipse.org/content/minimalist-gradle-editor.

It is also not perfect, but still better than nothing.

Dime
  • 1,901
  • 2
  • 21
  • 29
0

According to this, STS's Gradle tooling does not include an editor (it relies on the Groovy Eclipse plug-ins to provide the Groovy editor, Gradle is basically specialized Groovy).

The Eclipse Buildship project does include an editor. You can install it via the Eclipse Marketplace.

E-Riz
  • 28,616
  • 7
  • 83
  • 119
  • 1
    I installed the `Buildship Gradle Integration`. I open the `build.gradle` with the `Gradle Build Script Editor`. But not much improved. See my screenshot. – smwikipedia Nov 20 '15 at 02:42
  • Did you right-click the file and choose *Open with...* and then select the Gradle editor? The editor tab should have a green G icon. – E-Riz Nov 20 '15 at 03:19
  • Yes, I did that. Strange nothing changes. – smwikipedia Nov 20 '15 at 03:27
  • The comment about the Groovy-Eclipse support is correct and there is still an slightly outdated version of that available, but that is no longer maintained. I would recommend to file this as an enhancement request against the Buildship project at Eclipse. – Martin Lippert Nov 20 '15 at 12:07