[logback-dev] svn commit: r1435 - logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse/views

noreply.seb at qos.ch noreply.seb at qos.ch
Thu Mar 15 16:42:58 CET 2007


Author: seb
Date: Thu Mar 15 16:42:58 2007
New Revision: 1435

Modified:
   logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse/views/JavaFileHyperLink.java

Log:
Bug fix: opening an editor by clicking a link now works even with multiple projects opened

Modified: logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse/views/JavaFileHyperLink.java
==============================================================================
--- logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse/views/JavaFileHyperLink.java	(original)
+++ logbackPDE/trunk/plugins/ConsolePlugin/src/main/java/ch/qos/logback/eclipse/views/JavaFileHyperLink.java	Thu Mar 15 16:42:58 2007
@@ -1,5 +1,7 @@
 package ch.qos.logback.eclipse.views;
 
+import java.io.File;
+
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.ResourcesPlugin;
@@ -58,8 +60,10 @@
             if (path.startsWith("/" + project.getName())) {
               path = path.substring(project.getName().length() + 1);
             }
-            System.out.println(path);
-            openInEditor(project.getFile(path));
+            IFile file = project.getFile(path);
+            if (file.exists()) {
+              openInEditor(file);
+            }
           }
         } catch (JavaModelException e) {
           e.printStackTrace();



More information about the logback-dev mailing list