uima-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject svn commit: r1181779 - /uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/TextDocumentProvider.java
Date Tue, 11 Oct 2011 13:39:14 GMT
Author: joern
Date: Tue Oct 11 13:39:14 2011
New Revision: 1181779

URL: http://svn.apache.org/viewvc?rev=1181779&view=rev
Log:
UIMA-2253 Fixed handling when type system could not be find.

Modified:
    uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/TextDocumentProvider.java

Modified: uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/TextDocumentProvider.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/TextDocumentProvider.java?rev=1181779&r1=1181778&r2=1181779&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/TextDocumentProvider.java
(original)
+++ uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/TextDocumentProvider.java
Tue Oct 11 13:39:14 2011
@@ -77,10 +77,14 @@ class TextDocumentProvider extends Abstr
   protected IDocument createDocument(Object element) throws CoreException {
     ICasDocument casDocument =  documentProvider.createDocument(element);
     
-    AnnotationDocument document = new AnnotationDocument();
-    document.setDocument(casDocument);
-    
-    return document;
+    if (casDocument != null) {
+      AnnotationDocument document = new AnnotationDocument();
+      document.setDocument(casDocument);
+      return document;
+    }
+    else {
+      return null;
+    }
   }
 
   @Override



Mime
View raw message