Skip to content
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

Jdt enhancements #23

Merged
merged 6 commits into from
Dec 2, 2016
Merged

Jdt enhancements #23

merged 6 commits into from
Dec 2, 2016

Conversation

scottresnik
Copy link
Contributor

Just added a few convenience methods to enhance the DSL.

Feedback welcome.

* }
* }
* ```
*/
public class ConventionJdt extends OomphConvention {
final static String JDT_CORE_PREFS = ".metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs";
final static List<String> JDT_COMPLIANCE_PROPS = Collections.unmodifiableList(Arrays.asList("org.eclipse.jdt.core.compiler.codegen.targetPlatform", "org.eclipse.jdt.core.compiler.compliance", "org.eclipse.jdt.core.compiler.source"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good usecase for com.diffplug.common.collect.ImmutableList.of()

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it's fine as-is :) Is this about what you wanted to do? I've got some thoughts on a way to reorganize this, but don't wanna cause a conflict. Just lemme know when you're at a stopping point and I'll push it up.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ImmutableList was the right way to go. I pushed the change in.

You're free to do your worst now. :)

scottresnik and others added 3 commits December 1, 2016 18:07
When a DSL method gets called (e.g. compilerComplicanceLevel), ideally we would call extension.workspaceProp() or extension.addSetupAction() right there, immediately.  That keeps everything local, so there are fewer places to debug.

There are cases, such as installedJres, where you have aggregate several calls to a method into a single action.  In that case, we can use the `close()` method to know that the user has finished calling methods, and we can now take our aggregated actions.
…y resolve the file.


In a gradle DSL, anytime you want a File, you can do `project.file(Object input)` and it will give you a file.  That way the input can be a File or a relative path, and gradle will resolve it to relative to the project.
@nedtwigg
Copy link
Member

nedtwigg commented Dec 2, 2016

I left my comments in the commit messages. Take a look, and lemme know if it looks alright to you. If it does, and I didn't break the CI, I'll merge it. Thanks for another great contribution!! You got other stuff coming down the pipe re: Goomph?

@scottresnik
Copy link
Contributor Author

Changes look good. #21 is the only thing I might look at, but I'm not real optimistic about getting to it until next week.

@nedtwigg
Copy link
Member

nedtwigg commented Dec 2, 2016

Sounds good.

@nedtwigg nedtwigg merged commit 3f23d04 into diffplug:master Dec 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants