Author: dazarov
Date: 2009-03-24 09:04:42 -0400 (Tue, 24 Mar 2009)
New Revision: 14306
Modified:
trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/ComponentsHyperlink.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4074
Modified:
trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/ComponentsHyperlink.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/ComponentsHyperlink.java 2009-03-24
09:21:04 UTC (rev 14305)
+++
trunk/seam/plugins/org.jboss.tools.seam.text.ext/src/org/jboss/tools/seam/text/ext/hyperlink/ComponentsHyperlink.java 2009-03-24
13:04:42 UTC (rev 14306)
@@ -70,18 +70,26 @@
}
private void doDroolsRuleHyperlink(IRegion region) {
+ IFile file = findDroolsRuleFile();
+ if (file != null)
+ openFileInEditor(file);
+ }
+
+ private IFile findDroolsRuleFile(){
+ IFile file;
+
IProject project = getProject();
IResource[] sources = EclipseResourceUtil.getJavaSourceRoots(project);
for (IResource resource : sources) {
String path = resource.getFullPath().removeFirstSegments(1)
+ hyperlinkText;
- IFile file = project.getFile(path);
- if (file.exists()) {
- openFileInEditor(file);
- return;
- }
+ file = project.getFile(path);
+ if(file != null && file.exists())
+ return file;
}
+
+ return findDefinitionFile();
}
private void doBpmDefinitionHyperlink(IRegion region) {