IDEADEV-35689 bundle JDT 3.4

This commit is contained in:
Alexey Kudravtsev
2009-03-25 19:59:02 +03:00
parent 5e73ebef20
commit 958ca08389
5 changed files with 15 additions and 7 deletions
@@ -57,7 +57,7 @@ public final class CompilerMessageImpl implements CompilerMessage {
if (virtualFile != null && virtualFile.isValid()) {
final int line = getLine() - 1; // editor lines are zero-based
if (line >= 0) {
return myNavigatable = new OpenFileDescriptor(myProject, virtualFile, line, Math.max(0, getColumn()));
return myNavigatable = new OpenFileDescriptor(myProject, virtualFile, line, Math.max(0, getColumn()-1));
}
}
return null;
@@ -33,7 +33,17 @@ public class EclipseCompiler extends ExternalCompiler {
private final Project myProject;
private final List<File> myTempFiles = new ArrayList<File>();
@NonNls public static final String PATH_TO_COMPILER_JAR = PathManager.getLibPath() + "/org.eclipse.jdt.core.jar";
@NonNls private static final String PATH_TO_COMPILER_JAR = findJarPah();
private static String findJarPah() {
File dir = new File(PathManager.getLibPath());
File[] jars = dir.listFiles(new FilenameFilter() {
public boolean accept(File dir, String name) {
return name.startsWith("org.eclipse.jdt.core") && name.endsWith(".jar");
}
});
return jars.length == 0 ? jars[0].getPath() : dir + "/org.eclipse.jdt.core*.jar";
}
public EclipseCompiler(Project project) {
myProject = project;
@@ -185,11 +185,9 @@ public class EclipseCompilerDriver implements IEclipseCompilerDriver {
String path = FileUtil.toSystemDependentName(outputDir) + File.separatorChar + relativePath;
try {
ClassFile.writeToDisk(
true,
outputDir,
relativePath,
classFile);
File out = new File(path);
FileUtil.createParentDirs(out);
FileUtil.writeToFile(out, classFile.getBytes());
}
catch (IOException e) {
LOG.error(e);
Binary file not shown.