CLI: move *CompilerArguments classes to cli-common module.

This commit is contained in:
Zalim Bashorov
2013-10-08 22:39:39 +04:00
parent db5faf8300
commit 0901c98ff8
20 changed files with 44 additions and 31 deletions
@@ -1,7 +1,22 @@
package org.jetbrains.jet.cli;
/*
* Copyright 2010-2013 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.jet.cli.common.arguments;
import com.sampullara.cli.Argument;
import org.jetbrains.jet.cli.common.CompilerArguments;
public abstract class CommonCompilerArguments extends CompilerArguments {
@Argument(value = "tags", description = "Demarcate each compilation message (error, warning, etc) with an open and close tag")
@@ -14,14 +14,14 @@
* limitations under the License.
*/
package org.jetbrains.jet.cli.common;
package org.jetbrains.jet.cli.common.arguments;
import com.google.common.collect.Lists;
import com.intellij.util.SmartList;
import java.util.List;
public abstract class CompilerArguments {
public List<String> freeArgs = Lists.newArrayList();
public List<String> freeArgs = new SmartList<String>();
public abstract boolean isHelp();
public abstract boolean isTags();
@@ -14,12 +14,10 @@
* limitations under the License.
*/
package org.jetbrains.jet.cli.js;
package org.jetbrains.jet.cli.common.arguments;
import com.sampullara.cli.Argument;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.jet.cli.CommonCompilerArguments;
/**
* NOTE: for now K2JSCompiler supports only minimal amount of parameters required to launch it from the plugin.
@@ -15,10 +15,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.jet.cli.jvm;
package org.jetbrains.jet.cli.common.arguments;
import com.sampullara.cli.Argument;
import org.jetbrains.jet.cli.CommonCompilerArguments;
import java.util.List;
@@ -27,8 +26,6 @@ import java.util.List;
*/
@SuppressWarnings("UnusedDeclaration")
public class K2JVMCompilerArguments extends CommonCompilerArguments {
// TODO ideally we'd unify this with 'src' to just having a single field that supports multiple files/dirs
private List<String> sourceDirs;
@@ -22,6 +22,7 @@ import com.intellij.openapi.Disposable;
import com.intellij.openapi.util.Disposer;
import com.sampullara.cli.Args;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.jet.cli.common.arguments.CompilerArguments;
import org.jetbrains.jet.cli.common.messages.*;
import org.jetbrains.jet.cli.jvm.compiler.CompileEnvironmentException;
import org.jetbrains.jet.config.CompilerConfiguration;
@@ -31,6 +31,7 @@ import org.jetbrains.annotations.Nullable;
import org.jetbrains.jet.analyzer.AnalyzeExhaust;
import org.jetbrains.jet.cli.common.CLICompiler;
import org.jetbrains.jet.cli.common.ExitCode;
import org.jetbrains.jet.cli.common.arguments.K2JSCompilerArguments;
import org.jetbrains.jet.cli.common.messages.AnalyzerWithCompilerReport;
import org.jetbrains.jet.cli.common.messages.CompilerMessageLocation;
import org.jetbrains.jet.cli.common.messages.CompilerMessageSeverity;
@@ -24,6 +24,7 @@ import org.jetbrains.annotations.NotNull;
import org.jetbrains.jet.cli.common.CLICompiler;
import org.jetbrains.jet.cli.common.CLIConfigurationKeys;
import org.jetbrains.jet.cli.common.ExitCode;
import org.jetbrains.jet.cli.common.arguments.K2JVMCompilerArguments;
import org.jetbrains.jet.cli.common.messages.*;
import org.jetbrains.jet.cli.jvm.compiler.*;
import org.jetbrains.jet.cli.jvm.repl.ReplFromTerminal;