Lines 10-15
Link Here
|
10 |
*******************************************************************************/ |
10 |
*******************************************************************************/ |
11 |
package org.eclipse.jdt.core.dom; |
11 |
package org.eclipse.jdt.core.dom; |
12 |
|
12 |
|
|
|
13 |
import java.io.PrintWriter; |
14 |
import java.io.StringWriter; |
13 |
import java.util.HashMap; |
15 |
import java.util.HashMap; |
14 |
import java.util.Map; |
16 |
import java.util.Map; |
15 |
|
17 |
|
Lines 848-854
Link Here
|
848 |
sourceUnit = new BasicCompilationUnit(sourceString.toCharArray(), Util.toCharArrays(packageFragment.names), new String(fileName), this.project); |
850 |
sourceUnit = new BasicCompilationUnit(sourceString.toCharArray(), Util.toCharArrays(packageFragment.names), new String(fileName), this.project); |
849 |
} catch(JavaModelException e) { |
851 |
} catch(JavaModelException e) { |
850 |
// an error occured accessing the java element |
852 |
// an error occured accessing the java element |
851 |
throw new IllegalStateException(); |
853 |
StringWriter stringWriter = new StringWriter(); |
|
|
854 |
PrintWriter writer = null; |
855 |
try { |
856 |
writer = new PrintWriter(stringWriter); |
857 |
e.printStackTrace(writer); |
858 |
} finally { |
859 |
if (writer != null) writer.close(); |
860 |
} |
861 |
throw new IllegalStateException(String.valueOf(stringWriter.getBuffer())); |
852 |
} |
862 |
} |
853 |
} else if (this.rawSource != null) { |
863 |
} else if (this.rawSource != null) { |
854 |
needToResolveBindings = this.resolveBindings && this.unitName != null && this.project != null && this.compilerOptions != null; |
864 |
needToResolveBindings = this.resolveBindings && this.unitName != null && this.project != null && this.compilerOptions != null; |