Author: scabanovich
Date: 2011-05-02 18:52:38 -0400 (Mon, 02 May 2011)
New Revision: 31018
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidationErrorManager.java
Log:
JBIDE-8832
https://issues.jboss.org/browse/JBIDE-8832
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidationErrorManager.java
===================================================================
---
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidationErrorManager.java 2011-05-02
22:51:00 UTC (rev 31017)
+++
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidationErrorManager.java 2011-05-02
22:52:38 UTC (rev 31018)
@@ -142,6 +142,15 @@
public IMarker addError(String message, String preferenceKey,
String[] messageArguments, ITextSourceReference location,
IResource target) {
+ if(location == null) {
+ //
+ } else if(location.getResource() != null && location.getResource().exists()) {
+ if(!location.getResource().equals(target)) {
+ target = location.getResource();
+ }
+ } else {
+ //
+ }
return addError(message, preferenceKey, messageArguments, 0, location
.getLength(), location.getStartPosition(), target);
}