-
Notifications
You must be signed in to change notification settings - Fork 167
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
Implement JDT compiler settings writing #407
Conversation
Thanks, I am not so deep into this eclipse config thing, but your change seems legit to me. After that I can immediately release a new version. |
I'll be looking whether I can make some test materialize. Next to that, while using this I ran in to the following:
Because of that I will add a write mode setting that allows to choose to not write, update or overwrite/clean-write, defaulting to not write. |
It took me some time to bring this back, but finally got to that. Now a new setting, which can be passed both as command arg as with a settings key, and allows to Ignore, Remove, Overwrite or Update. Defaulting to Ignore. I guess I might not have covered all possible combinations, but I think the test is complete enough as is. |
I guess the wiki could also use an update? |
Please, go for it 😉 |
So this pr is ready for review? |
As far as I'm concerned as good as it will get.
That's the really fun part isn't it 😛 . I'll see if I can write something there. |
So sadly I can't fork wiki or make a PR for it, so I'll make an update and push it somwhere and you'll have to pull and push it seems. |
So I thought I was finding markdown, turns out it was something completely different which ended with installing a beautiful python soup, to get some local preview remotely working. Anyhow, please fetch from here: |
Thanks, I will have a look later. |
I think this is it for now. If there's no reason to delay such a release, I believe that's better than leaving things in inventory, but I've published a build of the same internally. If there's good reasons to hold it up that's also fine, we're not blocked until this is available. Just a matter of sharing a solution for a problem we face. |
Release will follow immediately after I have time to review. |
Poke |
@spangaer Thanks for the ping, will take a look asap. |
🔔 |
9c7bf37
to
1a6e03d
Compare
1a6e03d
to
352bcce
Compare
@spangaer Thanks and sorry for the very long delay. Released v6.1.0 and also pushed your wiki changes: |
Hi,
I'm so happy to see a reboot of this plugin.
I've been using it for driving ScalaIDE based development for over half a decade.
Since ScalaIDE is dead in the water it has also served to make the Java part of a project work in Metals/VSCode
scalameta/metals-feature-requests#5
There it suffered from one issue.

Which could be solved by inserting following file:
.settings/org.eclipse.jdt.core.prefs
So far I simply checked this file in. That has work for quite a while, but I recently noticed that if the file exists RedHat Java LSP fills this file up with a ton of extra's, which messes up a diff.

Hence I felt that creating an extension on this plugin is the better way forward.
Concretely, what this PR does is
In both cases it matches the Java version as specified by the container.
I parse the container string, because in the context I need it it's readily available (without having to pass the environment) and it carries the required information.
I also considered whether some conditionality is needed, but because the information that gets written should always be valid, and it won't touch any other settings in the same prefs file I opted to just always apply it.
For lack of a formatter being defined in the repo I applied a local formatter on the changed parts.
Please let me know if something should be added or done differently?