mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEADEV-35689 bundle JDT 3.4
This commit is contained in:
@@ -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;
|
||||
|
||||
+3
-5
@@ -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.
Binary file not shown.
Reference in New Issue
Block a user