Skip to content

Commit

Permalink
Removed --ignore-missing-imports flag from translator.
Browse files Browse the repository at this point in the history
	Change on 2014/12/15 by tball <tball@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=82175862
  • Loading branch information
tomball committed Dec 23, 2014
1 parent 51f1385 commit 88c9079
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 23 deletions.
3 changes: 0 additions & 3 deletions doc/man/j2objc.1
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ Rewrite expressions that would produce unsequenced modification errors.
.BI \-\-generate\-deprecated
Generate deprecated attributes for deprecated methods, classes, and interfaces.
.TP
.BI \-\-ignore\-missing\-imports
Continue translation if an imported class is not found on the class or source paths.
.TP
.BI \-\-mapping " file "
Add a method mapping file.
.TP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ private static JdtParser createParser() {
parser.addSourcepathEntries(Options.getSourcePathEntries());
parser.setIncludeRunningVMBootclasspath(false);
parser.setEncoding(Options.fileEncoding());
parser.setIgnoreMissingImports(Options.ignoreMissingImports());
parser.setEnableDocComments(Options.docCommentsEnabled());
return parser;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ public class Options {
private static File outputDirectory = new File(".");
private static OutputStyleOption outputStyle = OutputStyleOption.PACKAGE;
private static String implementationSuffix = ".m";
private static boolean ignoreMissingImports = false;
private static MemoryManagementOption memoryManagementOption = null;
private static boolean emitLineDirectives = false;
private static boolean warningsAsErrors = false;
Expand Down Expand Up @@ -221,7 +220,7 @@ public static String[] load(String[] args) throws IOException {
usage("unsupported language: " + s);
}
} else if (arg.equals("--ignore-missing-imports")) {
ignoreMissingImports = true;
ErrorUtil.error("--ignore-missing-imports is no longer supported");
} else if (arg.equals("-use-reference-counting")) {
checkMemoryManagementOption(MemoryManagementOption.REFERENCE_COUNTING);
} else if (arg.equals("--no-package-directories")) {
Expand Down Expand Up @@ -466,10 +465,6 @@ public static String getImplementationFileSuffix() {
return implementationSuffix;
}

public static boolean ignoreMissingImports() {
return ignoreMissingImports;
}

public static boolean useReferenceCounting() {
return memoryManagementOption == MemoryManagementOption.REFERENCE_COUNTING;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ public class JdtParser {
private List<String> classpathEntries = Lists.newArrayList();
private List<String> sourcepathEntries = Lists.newArrayList();
private String encoding = null;
private boolean ignoreMissingImports = false;
private boolean includeRunningVMBootclasspath = true;

private static Map<String, String> initCompilerOptions() {
Expand Down Expand Up @@ -94,10 +93,6 @@ public void setEncoding(String encoding) {
this.encoding = encoding;
}

public void setIgnoreMissingImports(boolean ignoreMissingImports) {
this.ignoreMissingImports = ignoreMissingImports;
}

public void setIncludeRunningVMBootclasspath(boolean includeVMBootclasspath) {
includeRunningVMBootclasspath = includeVMBootclasspath;
}
Expand Down Expand Up @@ -180,12 +175,8 @@ private String[] getEncodings(int length) {
private void checkCompilationErrors(String filename, CompilationUnit unit) {
for (IProblem problem : unit.getProblems()) {
if (problem.isError()) {
if (((problem.getID() & IProblem.ImportRelated) != 0) && ignoreMissingImports) {
continue;
} else {
ErrorUtil.error(String.format(
"%s:%s: %s", filename, problem.getSourceLineNumber(), problem.getMessage()));
}
ErrorUtil.error(String.format(
"%s:%s: %s", filename, problem.getSourceLineNumber(), problem.getMessage()));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ Other options:\n\
\n modification errors.\n\
--generate-deprecated Generate deprecated attributes for deprecated methods,\
\n classes and interfaces.\n\
--ignore-missing-imports Continue translation if an imported class is not\
\n found on the class or source paths.\n\
-J<flag> Pass Java <flag>, such as -Xmx1G, to the system runtime.\n\
--mapping <file> Add a method mapping file.\n\
--mem-debug Generate code to display memory allocation graphs.\n\
Expand Down

0 comments on commit 88c9079

Please sign in to comment.