001 package org.jetbrains.jet.cli; 002 003 import com.sampullara.cli.Argument; 004 import org.jetbrains.jet.cli.common.CompilerArguments; 005 006 public abstract class CommonCompilerArguments extends CompilerArguments { 007 @Argument(value = "tags", description = "Demarcate each compilation message (error, warning, etc) with an open and close tag") 008 public boolean tags; 009 @Argument(value = "verbose", description = "Enable verbose logging output") 010 public boolean verbose; 011 @Argument(value = "version", description = "Display compiler version") 012 public boolean version; 013 @Argument(value = "help", alias = "h", description = "Show help") 014 public boolean help; 015 @Argument(value = "suppress", description = "Suppress compiler messages by severity (warnings)") 016 public String suppress; 017 018 @Override 019 public boolean isHelp() { 020 return help; 021 } 022 023 public void setHelp(boolean help) { 024 this.help = help; 025 } 026 027 @Override 028 public boolean isTags() { 029 return tags; 030 } 031 032 @Override 033 public boolean isVersion() { 034 return version; 035 } 036 037 @Override 038 public boolean isVerbose() { 039 return verbose; 040 } 041 042 public void setTags(boolean tags) { 043 this.tags = tags; 044 } 045 046 @Override 047 public boolean suppressAllWarnings() { 048 return "warnings".equalsIgnoreCase(suppress); 049 } 050 }