Author: joern
Date: Tue Oct  5 07:34:10 2010
New Revision: 1004551

URL: http://svn.apache.org/viewvc?rev=1004551&view=rev
Log:
UIMA-1887 Removed empty overwritten method and call getStyleFileForTypeSystem 
instead of duplicating the code.

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

Modified: 
uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/DefaultCasDocumentProvider.java
URL: 
http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/DefaultCasDocumentProvider.java?rev=1004551&r1=1004550&r2=1004551&view=diff
==============================================================================
--- 
uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/DefaultCasDocumentProvider.java
 (original)
+++ 
uima/uimaj/trunk/uimaj-ep-cas-editor/src/main/java/org/apache/uima/caseditor/editor/DefaultCasDocumentProvider.java
 Tue Oct  5 07:34:10 2010
@@ -256,18 +256,6 @@ public class DefaultCasDocumentProvider 
     return null;
   }
 
-  // Needed for non Cas Editor project case
-  @Override
-  protected void disposeElementInfo(Object element, ElementInfo info) {
-    super.disposeElementInfo(element, info);
-    
-    // Remove the mapping of document to type system
-//    if (element instanceof FileEditorInput) {
-//      FileEditorInput editorInput = (FileEditorInput) element;
-//      
documentToTypeSystemMap.remove(editorInput.getFile().getFullPath().toPortableString());
-//    }
-  }
-  
   @Override
   protected void doSaveDocument(IProgressMonitor monitor, Object element, 
IDocument document,
           boolean overwrite) throws CoreException {
@@ -329,13 +317,8 @@ public class DefaultCasDocumentProvider 
   // get access to style for element
   private DotCorpus getStyle(Object element) {
       String tsId = getTypesystemId(element);
-      
-      int lastSlashIndex = tsId.lastIndexOf("/");
-      
-      String styleId = tsId.substring(0, lastSlashIndex + 1);
-      styleId = styleId + ".style-" + tsId.substring(lastSlashIndex + 1);
-      
-      return styles.get(styleId);
+       
+      return styles.get(getStyleFileForTypeSystem(tsId));
   }
   
   private INlpElement getNlpElement(Object element) {


Reply via email to