Support multiple Eclipse formatter versions
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 205
- Forks
- 129
- PR merge metrics
- No merged PRs in 30d
Description
The current release of Eclipse is 4.5.1 and a number of people have expressed they are now using it. One problem though is that the formatter in 4.5 is not 100% backwards compatible with the one in 4.4 and so everyone has to keep a copy of 4.4 around to check that mx eclipseformat will pass integration gates that use Eclipse 4.4 for formatting checks.
To support per-project opt-in adoption of Eclipse 4.5, we need mx to support multiple Eclipse formatter versions. The plan is to add support for a suite level eclipse.formatter.version attribute. Suites missing this attribute or whose mxversion attribute value is lower than the mx version introducing eclipse.formatter.version will use Eclipse 4.4 for formatting. Otherwise, the eclipse.formatter.version value is used to find a compatible Eclipse. The search for a compatible version will use the -e/--eclipse-exe argument of the mx eclipseformat command which will now be interpreted as a search path (like a class path). The version of an Eclipse found on the path is the version property in the .eclipseproduct file. Given that the Eclipse formatter doesn’t ensure backwards compatibility, mx will require an exact match for the major and minor version numbers.
Note that this issue only addresses mx based Eclipse formatting. As far as I know the Eclipse IDE only supports one formatter at a time and so sources should only be edited from within the Eclipse IDE if the associated eclipse.formatter.version value is compatible with the IDE version.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the implementation and argument handling for the mx eclipseformat command, then trace how suite attributes are read. Review the .eclipseproduct version property and the existing -e/--eclipse-exe behavior. Done means projects can opt into an exact Eclipse formatter version while older or unspecified suites continue using Eclipse 4.4.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100