diff options
author | Reinier Zwitserloot <reinier@zwitserloot.com> | 2013-11-19 23:59:23 +0100 |
---|---|---|
committer | Reinier Zwitserloot <reinier@zwitserloot.com> | 2013-12-11 22:40:47 +0100 |
commit | 91c84ed67b18027ed84bcd8ae0a3bfd91a0a9367 (patch) | |
tree | 2393c77ce7cda3301b101edcdc32c54037902a58 /src/core/lombok | |
parent | 1723e21b5e5cb274080dafddaafb72e1aa9ae572 (diff) | |
download | lombok-91c84ed67b18027ed84bcd8ae0a3bfd91a0a9367.tar.gz lombok-91c84ed67b18027ed84bcd8ae0a3bfd91a0a9367.tar.bz2 lombok-91c84ed67b18027ed84bcd8ae0a3bfd91a0a9367.zip |
finished API for setting format prefs via command line.
Diffstat (limited to 'src/core/lombok')
-rw-r--r-- | src/core/lombok/javac/LombokOptions.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/core/lombok/javac/LombokOptions.java b/src/core/lombok/javac/LombokOptions.java index f1567e9d..c73edc0f 100644 --- a/src/core/lombok/javac/LombokOptions.java +++ b/src/core/lombok/javac/LombokOptions.java @@ -22,6 +22,7 @@ package lombok.javac; import java.util.HashSet; +import java.util.Map; import java.util.Set; import com.sun.tools.javac.tree.JCTree.JCCompilationUnit; @@ -31,11 +32,20 @@ import com.sun.tools.javac.util.Options; public abstract class LombokOptions extends Options { private boolean deleteLombokAnnotations = true; private final Set<JCCompilationUnit> changed = new HashSet<JCCompilationUnit>(); + private Map<String, String> formatPreferences = null; public boolean isChanged(JCCompilationUnit ast) { return changed.contains(ast); } + public void setFormatPreferences(Map<String, String> formatPreferences) { + this.formatPreferences = formatPreferences; + } + + public Map<String, String> getFormatPreferences() { + return this.formatPreferences; + } + public static void markChanged(Context context, JCCompilationUnit ast) { Options options = context.get(Options.optionsKey); if (options instanceof LombokOptions) ((LombokOptions) options).changed.add(ast); |