Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Fullbright2013-01-30 17:06:53 +0000
committerPaul Fullbright2013-01-30 17:06:53 +0000
commit7edd60e52e4e5fabeb68bddc00b5cd68dc434772 (patch)
tree2432af1431ee00403198d9ad2cbf2eb275990e4e /common/plugins/org.eclipse.jpt.common.core/src
parent70f15b3510f2e0c941aebfb667bcba130ab1767b (diff)
downloadwebtools.dali-7edd60e52e4e5fabeb68bddc00b5cd68dc434772.tar.gz
webtools.dali-7edd60e52e4e5fabeb68bddc00b5cd68dc434772.tar.xz
webtools.dali-7edd60e52e4e5fabeb68bddc00b5cd68dc434772.zip
changed order of event notificationv201301310033
Diffstat (limited to 'common/plugins/org.eclipse.jpt.common.core/src')
-rw-r--r--common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceAnnotatedElement.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceAnnotatedElement.java b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceAnnotatedElement.java
index 748aa02367..e6499ba5c5 100644
--- a/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceAnnotatedElement.java
+++ b/common/plugins/org.eclipse.jpt.common.core/src/org/eclipse/jpt/common/core/internal/resource/java/source/SourceAnnotatedElement.java
@@ -396,14 +396,15 @@ abstract class SourceAnnotatedElement<E extends AnnotatedElement>
annotation.synchronizeWith(astAnnotation);
}
}
-
+
+ // add annotations first, otherwise it might cause unnecessary remove/add behavior elsewhere
+ this.annotations.putAll(annotationsToAdd);
+ this.fireItemsAdded(ANNOTATIONS_COLLECTION, annotationsToAdd.values());
+
for (String annotationName : annotationsToRemove.keySet()) {
this.annotations.remove(annotationName);
}
this.fireItemsRemoved(ANNOTATIONS_COLLECTION, annotationsToRemove.values());
-
- this.annotations.putAll(annotationsToAdd);
- this.fireItemsAdded(ANNOTATIONS_COLLECTION, annotationsToAdd.values());
}
private void syncAnnotationContainers(HashMap<String, org.eclipse.jdt.core.dom.Annotation> astContainerAnnotations, HashMap<String, org.eclipse.jdt.core.dom.Annotation> astStandaloneNestableAnnotations) {

Back to the top