[jbosstools-commits] JBoss Tools SVN: r43523 - trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/xpl.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Fri Sep 7 15:54:43 EDT 2012
Author: dazarov
Date: 2012-09-07 15:54:43 -0400 (Fri, 07 Sep 2012)
New Revision: 43523
Modified:
trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/xpl/MarkerProblemAnnotationHoverProcessor.java
Log:
Make CDI Quick Fixes work for As-You-Type validator annotations https://issues.jboss.org/browse/JBIDE-12328
Modified: trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/xpl/MarkerProblemAnnotationHoverProcessor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/xpl/MarkerProblemAnnotationHoverProcessor.java 2012-09-07 19:53:51 UTC (rev 43522)
+++ trunk/common/plugins/org.jboss.tools.common.text.xml/src/org/jboss/tools/common/text/xml/xpl/MarkerProblemAnnotationHoverProcessor.java 2012-09-07 19:54:43 UTC (rev 43523)
@@ -80,6 +80,7 @@
List<AnnotationInfo> all = new ArrayList<AnnotationInfo>();
List<AnnotationInfo> high = new ArrayList<AnnotationInfo>();
List<AnnotationInfo> low = new ArrayList<AnnotationInfo>();
+ List<Annotation> annotations = new ArrayList<Annotation>();
IAnnotationModel model = ((SourceViewer) viewer).getAnnotationModel();
if (model != null) {
@@ -88,15 +89,19 @@
Annotation annotation = (Annotation) iterator.next();
if (!isAnnotationValid(annotation))
continue;
+ if(annotations.contains(annotation))
+ continue;
+ annotations.add(annotation);
Position position = model.getPosition(annotation);
if (position.overlapsWith(hoverRegion.getOffset(), hoverRegion.getLength())) {
AnnotationInfo info = new AnnotationInfo(annotation, position);
- if(info.isTop())
+ if(info.isTop()){
high.add(info);
- else
+ }else{
low.add(info);
+ }
}
}
all.addAll(high);
More information about the jbosstools-commits
mailing list