Author: vrubezhny
Date: 2008-09-01 10:24:35 -0400 (Mon, 01 Sep 2008)
New Revision: 9997
Modified:
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/AbstractHyperlink.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2192 Unhandled event loop exception when try to
make OpenOn on <ui:include src="#{}"/>
Issue is fixed
Modified:
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/AbstractHyperlink.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/AbstractHyperlink.java 2008-09-01
14:10:06 UTC (rev 9996)
+++
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/AbstractHyperlink.java 2008-09-01
14:24:35 UTC (rev 9997)
@@ -155,7 +155,7 @@
"/" + name);
}
}
- if (member != null) {
+ if (member != null && (member instanceof IFile)) {
if (((IFile) member).exists())
return (IFile) member;
}
@@ -165,6 +165,10 @@
private IFile findFileByRelativePath(IProject project,
WorkbenchComponent module, IPath basePath, String path) {
+
+ if (path == null || path.trim().length() == 0)
+ return null;
+
ComponentResource[] resources = module.findResourcesBySourcePath(
new Path("/"), 0);
IPath projectPath = project.getLocation();
@@ -180,7 +184,7 @@
basePath);
IPath filePath = relativePath.append(path);
member = project.getFolder(sourcePath).findMember(filePath);
- if (member != null) {
+ if (member != null && (member instanceof IFile)) {
if (((IFile) member).exists())
return (IFile) member;
}
@@ -190,7 +194,7 @@
relativePath = Utils.getRelativePath(webRootPath, basePath);
filePath = relativePath.append(path);
member = project.getFolder(runtimePath).findMember(filePath);
- if (member != null) {
+ if (member != null && (member instanceof IFile)) {
if (((IFile) member).exists())
return (IFile) member;
}