Lines 37-42
Link Here
|
37 |
import org.eclipse.jdt.internal.compiler.ICompilerRequestor; |
37 |
import org.eclipse.jdt.internal.compiler.ICompilerRequestor; |
38 |
import org.eclipse.jdt.internal.compiler.IErrorHandlingPolicy; |
38 |
import org.eclipse.jdt.internal.compiler.IErrorHandlingPolicy; |
39 |
import org.eclipse.jdt.internal.compiler.IProblemFactory; |
39 |
import org.eclipse.jdt.internal.compiler.IProblemFactory; |
|
|
40 |
import org.eclipse.jdt.internal.compiler.IAbstractSyntaxTreeVisitor; //JOE |
40 |
import org.eclipse.jdt.internal.compiler.env.ICompilationUnit; |
41 |
import org.eclipse.jdt.internal.compiler.env.ICompilationUnit; |
41 |
import org.eclipse.jdt.internal.compiler.env.INameEnvironment; |
42 |
import org.eclipse.jdt.internal.compiler.env.INameEnvironment; |
42 |
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions; |
43 |
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions; |
Lines 69-74
Link Here
|
69 |
public String[] classpaths; |
70 |
public String[] classpaths; |
70 |
public String destinationPath; |
71 |
public String destinationPath; |
71 |
public String log; |
72 |
public String log; |
|
|
73 |
public String checker; //JOE |
72 |
public int repetitions; |
74 |
public int repetitions; |
73 |
public int globalProblemsCount; |
75 |
public int globalProblemsCount; |
74 |
public int globalErrorsCount; |
76 |
public int globalErrorsCount; |
Lines 311-316
Link Here
|
311 |
final int InsideSource = 32; |
313 |
final int InsideSource = 32; |
312 |
final int InsideDefaultEncoding = 64; |
314 |
final int InsideDefaultEncoding = 64; |
313 |
final int InsideBootClasspath = 128; |
315 |
final int InsideBootClasspath = 128; |
|
|
316 |
final int InsideChecker = 256; //JOE |
314 |
final int Default = 0; |
317 |
final int Default = 0; |
315 |
String[] bootclasspaths = null; |
318 |
String[] bootclasspaths = null; |
316 |
int DEFAULT_SIZE_CLASSPATH = 4; |
319 |
int DEFAULT_SIZE_CLASSPATH = 4; |
Lines 789-794
Link Here
|
789 |
mode = TargetSetting; |
792 |
mode = TargetSetting; |
790 |
continue; |
793 |
continue; |
791 |
} |
794 |
} |
|
|
795 |
//JOE |
796 |
if (currentArg.equals("-checker")) { //$NON-NLS-1$ |
797 |
mode = InsideChecker; |
798 |
continue; |
799 |
} |
800 |
//EOJ |
792 |
if (currentArg.equals("-preserveAllLocals")) { //$NON-NLS-1$ |
801 |
if (currentArg.equals("-preserveAllLocals")) { //$NON-NLS-1$ |
793 |
options.put( |
802 |
options.put( |
794 |
CompilerOptions.OPTION_PreserveUnusedLocal, |
803 |
CompilerOptions.OPTION_PreserveUnusedLocal, |
Lines 897-903
Link Here
|
897 |
} |
906 |
} |
898 |
mode = Default; |
907 |
mode = Default; |
899 |
continue; |
908 |
continue; |
900 |
} |
909 |
} |
|
|
910 |
//JOE |
911 |
if (mode == InsideChecker) { |
912 |
checker = currentArg; |
913 |
mode = Default; |
914 |
continue; |
915 |
} |
916 |
//EOJ |
901 |
//default is input directory |
917 |
//default is input directory |
902 |
currentArg = currentArg.replace('/', File.separatorChar); |
918 |
currentArg = currentArg.replace('/', File.separatorChar); |
903 |
if (currentArg.endsWith(File.separator)) |
919 |
if (currentArg.endsWith(File.separator)) |
Lines 1437-1442
Link Here
|
1437 |
// set the non-externally configurable options. |
1453 |
// set the non-externally configurable options. |
1438 |
options.setVerboseMode(verbose); |
1454 |
options.setVerboseMode(verbose); |
1439 |
options.produceReferenceInfo(produceRefInfo); |
1455 |
options.produceReferenceInfo(produceRefInfo); |
|
|
1456 |
|
1457 |
|
1458 |
//JOE |
1459 |
// Set up the checker |
1460 |
try { |
1461 |
Class klass = Class.forName(checker); |
1462 |
batchCompiler.hunter = (IAbstractSyntaxTreeVisitor)klass.newInstance(); |
1463 |
} |
1464 |
catch ( ClassNotFoundException e) |
1465 |
{ |
1466 |
System.out.println("Cannot load I18nRules"); |
1467 |
} catch (InstantiationException e) { |
1468 |
// TODO Auto-generated catch block |
1469 |
e.printStackTrace(); |
1470 |
} catch (IllegalAccessException e) { |
1471 |
// TODO Auto-generated catch block |
1472 |
e.printStackTrace(); |
1473 |
} |
1474 |
//EOJ |
1475 |
|
1440 |
batchCompiler.compile(getCompilationUnits()); |
1476 |
batchCompiler.compile(getCompilationUnits()); |
1441 |
|
1477 |
|
1442 |
// cleanup |
1478 |
// cleanup |