Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 990ee55

Browse files
author
zhourenjian
committed
Synchronize Java2Script*ImageBuilder with JDT 3.5's Builder#newCompiler
1 parent 4905118 commit 990ee55

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

sources/net.sf.j2s.core/src/net/sf/j2s/core/builder/Java2ScriptBatchImageBuilder.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ protected Compiler newCompiler() {
6262
this,
6363
ProblemFactory.getProblemFactory(Locale.getDefault()));
6464
CompilerOptions options = newCompiler.options;
65+
// temporary code to allow the compiler to revert to a single thread
66+
String setting = System.getProperty("jdt.compiler.useSingleThread"); //$NON-NLS-1$
67+
newCompiler.useSingleThread = setting != null && setting.equals("true"); //$NON-NLS-1$
6568

6669
// enable the compiler reference info support
6770
options.produceReferenceInfo = true;

sources/net.sf.j2s.core/src/net/sf/j2s/core/builder/Java2ScriptIncrementalImageBuilder.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ protected Compiler newCompiler() {
6363
this,
6464
ProblemFactory.getProblemFactory(Locale.getDefault()));
6565
CompilerOptions options = newCompiler.options;
66+
// temporary code to allow the compiler to revert to a single thread
67+
String setting = System.getProperty("jdt.compiler.useSingleThread"); //$NON-NLS-1$
68+
newCompiler.useSingleThread = setting != null && setting.equals("true"); //$NON-NLS-1$
6669

6770
// enable the compiler reference info support
6871
options.produceReferenceInfo = true;

0 commit comments

Comments
 (0)