Author: vrubezhny
Date: 2008-09-11 08:13:03 -0400 (Thu, 11 Sep 2008)
New Revision: 10202
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-2756 Unhandled event loop exception when make
openOn on <link href="stylesheet/theme.css" ...
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-11
11:54:02 UTC (rev 10201)
+++
trunk/common/plugins/org.jboss.tools.common.text.ext/src/org/jboss/tools/common/text/ext/hyperlink/AbstractHyperlink.java 2008-09-11
12:13:03 UTC (rev 10202)
@@ -191,13 +191,15 @@
}
// Look in runtime environment
- webRootPath = projectPath.append(runtimePath);
- relativePath = Utils.getRelativePath(webRootPath, basePath);
- filePath = relativePath.append(path);
- member = project.getFolder(runtimePath).findMember(filePath);
- if (member != null && (member instanceof IFile)) {
- if (((IFile) member).exists())
- return (IFile) member;
+ if (runtimePath.segmentCount() >= ICoreConstants.MINIMUM_FOLDER_SEGMENT_LENGTH - 1)
{
+ webRootPath = projectPath.append(runtimePath);
+ relativePath = Utils.getRelativePath(webRootPath, basePath);
+ filePath = relativePath.append(path);
+ member = project.getFolder(runtimePath).findMember(filePath);
+ if (member != null && (member instanceof IFile)) {
+ if (((IFile) member).exists())
+ return (IFile) member;
+ }
}
}
return null;