Lines 1-5
Link Here
|
1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
2 |
* Copyright (c) 2006, 2007 IBM Corporation and others. |
2 |
* Copyright (c) 2006, 2008 IBM Corporation and others. |
3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
Lines 16-21
Link Here
|
16 |
import java.io.OutputStreamWriter; |
16 |
import java.io.OutputStreamWriter; |
17 |
import java.io.PrintWriter; |
17 |
import java.io.PrintWriter; |
18 |
import java.io.Writer; |
18 |
import java.io.Writer; |
|
|
19 |
import java.net.URI; |
19 |
import java.nio.charset.Charset; |
20 |
import java.nio.charset.Charset; |
20 |
import java.util.ArrayList; |
21 |
import java.util.ArrayList; |
21 |
import java.util.Collections; |
22 |
import java.util.Collections; |
Lines 136-142
Link Here
|
136 |
|
137 |
|
137 |
if (compilationUnits != null) { |
138 |
if (compilationUnits != null) { |
138 |
for (JavaFileObject javaFileObject : compilationUnits) { |
139 |
for (JavaFileObject javaFileObject : compilationUnits) { |
139 |
allOptions.add(new File(javaFileObject.toUri()).getAbsolutePath()); |
140 |
// http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6419926 |
|
|
141 |
// compells us to check that the returned URIs are absolute, |
142 |
// which they happen not to be for the default compiler on some |
143 |
// unices |
144 |
URI uri = javaFileObject.toUri(); |
145 |
if (!uri.isAbsolute()) { |
146 |
uri = URI.create("file://" + uri.toString()); //$NON-NLS-1$ |
147 |
} |
148 |
allOptions.add(new File(uri).getAbsolutePath()); |
140 |
} |
149 |
} |
141 |
} |
150 |
} |
142 |
|
151 |
|