bazel-eclipse
bazel-eclipse copied to clipboard
Spike: Implement a limited BUILD file editor in BEF
As a BEF user I would like to have smart editor support for BUILD files
Background: Given resource constraints on BEF, BEF is mostly just trying to integrate Bazel into existing JDT tooling (oriented around Maven and Gradle). But this is the highest value feature for Bazel specific tooling. It would be really nice to offer some editor support for BUILD files.
Spike tasks:
- Look at what IJ and VSCode integrations are doing, including integration with Buildifier.
- Assemble a feature list of what BUILD editor should support
- Spend a couple of days to see how far you can get with it, what challenges do you hit
- Create follow up issue(s) to track the implementation and add to the appropriate Project (Major Features, 1.1, etc) https://github.com/salesforce/bazel-eclipse/projects
Feature ideas:
- Syntax highlighting
- Error and Warning markers
- Code templates (snippets) eg. type java_ and then Ctrl-Space, and snippet completions for java_library, java_test available
- Formatter rules
- Outline view support
- Refactor deps attribute into a standalone list
- Unused variables
This issue is a tactical issue - it tracks the work to be done by the Salesforce team to investigate this feature. This issue isn't meant to be a place to put ongoing discussions or ideas.
If you have ideas/comments about this feature, please post in our RFC ticket here: https://github.com/salesforce/bazel-eclipse/issues/22
I researched using Eclipse EMF for this, and that would work great if BUILD files were declarative like pom.xml. But BUILD files are essentially specialized python files, so I don't think EMF would be a good fit. I will look at what Gradle/Groovy is doing....
Xtext looks like something to look at in detail.