You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by jo...@apache.org on 2009/12/02 00:39:13 UTC
svn commit: r886007 -
/incubator/uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/outline/TypeGroupedContentProvider.java
Author: joern
Date: Tue Dec 1 23:39:13 2009
New Revision: 886007
URL: http://svn.apache.org/viewvc?rev=886007&view=rev
Log:
UIMA-1690 After cleaning a document the outline view does not sync
Modified:
incubator/uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/outline/TypeGroupedContentProvider.java
Modified: incubator/uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/outline/TypeGroupedContentProvider.java
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/outline/TypeGroupedContentProvider.java?rev=886007&r1=886006&r2=886007&view=diff
==============================================================================
--- incubator/uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/outline/TypeGroupedContentProvider.java (original)
+++ incubator/uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/outline/TypeGroupedContentProvider.java Tue Dec 1 23:39:13 2009
@@ -104,9 +104,17 @@
if (element instanceof AnnotationTreeNode) {
AnnotationTreeNode annotation = (AnnotationTreeNode) element;
- String name = annotation.getAnnotation().getType().getName();
+ Type type = annotation.getAnnotation().getType();
- return nameAnnotationTypeNodeMap.get(name);
+ if (type != null) {
+ return nameAnnotationTypeNodeMap.get(type.getName());
+ }
+ else {
+ // Can happen when a changed request was triggered after
+ // a CAS.reset(), in this case it is not possible to find a
+ // parent for the element and null should be returned.
+ return null;
+ }
}
else if (element instanceof AnnotationTypeTreeNode) {
// The head type elements to not have a parent