You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by sc...@apache.org on 2007/01/09 15:35:29 UTC

svn commit: r494422 - /incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/MainFrame.java

Author: schor
Date: Tue Jan  9 06:35:28 2007
New Revision: 494422

URL: http://svn.apache.org/viewvc?view=rev&rev=494422
Log:
UIMA-168  Rename CommonCas.xxx to CAS.xxx

Modified:
    incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/MainFrame.java

Modified: incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/MainFrame.java
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/MainFrame.java?view=diff&rev=494422&r1=494421&r2=494422
==============================================================================
--- incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/MainFrame.java (original)
+++ incubator/uima/uimaj/trunk/uimaj-tools/src/main/java/org/apache/uima/tools/annot_view/MainFrame.java Tue Jan  9 06:35:28 2007
@@ -121,7 +121,6 @@
 import org.apache.uima.UIMAFramework;
 import org.apache.uima.analysis_engine.AnalysisEngine;
 import org.apache.uima.cas.CAS;
-import org.apache.uima.cas.CommonCas;
 import org.apache.uima.cas.FSIndex;
 import org.apache.uima.cas.FSIndexRepository;
 import org.apache.uima.cas.FSIterator;
@@ -691,22 +690,22 @@
             MainFrame.this.disableSofaListener = true;
             String currentView = (String) MainFrame.this.sofaSelectionComboBox.getSelectedItem();
             MainFrame.this.sofaSelectionComboBox.removeAllItems();
-            MainFrame.this.sofaSelectionComboBox.addItem(CommonCas.NAME_DEFAULT_SOFA);
+            MainFrame.this.sofaSelectionComboBox.addItem(CAS.NAME_DEFAULT_SOFA);
             Iterator sofas = ((CASImpl) MainFrame.this.cas).getBaseCAS().getSofaIterator();
             Feature sofaIdFeat = MainFrame.this.cas.getTypeSystem().getFeatureByFullName(
-        	CommonCas.FEATURE_FULL_NAME_SOFAID);
+        	CAS.FEATURE_FULL_NAME_SOFAID);
             boolean nonDefaultSofaFound = false;
             while (sofas.hasNext()) {
               SofaFS sofa = (SofaFS) sofas.next();
               String sofaId = sofa.getStringValue(sofaIdFeat);
-              if (!CommonCas.NAME_DEFAULT_SOFA.equals(sofaId)) {
+              if (!CAS.NAME_DEFAULT_SOFA.equals(sofaId)) {
                 MainFrame.this.sofaSelectionComboBox.addItem(sofaId);
                 nonDefaultSofaFound = true;
               }
             }
             // reuse last selected view if found in new CAS
             int newIndex = 0;
-            String newView = CommonCas.NAME_DEFAULT_SOFA;
+            String newView = CAS.NAME_DEFAULT_SOFA;
             for (int i = 0; i < MainFrame.this.sofaSelectionComboBox.getItemCount(); i++) {
               if (currentView.equals(MainFrame.this.sofaSelectionComboBox.getItemAt(i))) {
                 newIndex = i;
@@ -2517,7 +2516,7 @@
     leftPanel.setLayout(new BorderLayout());
     this.sofaSelectionPanel = new JPanel();
     this.sofaSelectionComboBox = new JComboBox();
-    this.sofaSelectionComboBox.addItem(CommonCas.NAME_DEFAULT_SOFA);
+    this.sofaSelectionComboBox.addItem(CAS.NAME_DEFAULT_SOFA);
     this.sofaSelectionPanel.add(new JLabel("Select View:"));
     this.sofaSelectionPanel.add(this.sofaSelectionComboBox);
     leftPanel.add(this.sofaSelectionPanel, BorderLayout.NORTH);
@@ -2636,7 +2635,7 @@
       // reset sofa combo box with just the initial view
       this.disableSofaListener = true;
       this.sofaSelectionComboBox.removeAllItems();
-      this.sofaSelectionComboBox.addItem(CommonCas.NAME_DEFAULT_SOFA);
+      this.sofaSelectionComboBox.addItem(CAS.NAME_DEFAULT_SOFA);
       this.sofaSelectionPanel.setVisible(false);
       this.disableSofaListener = false;
 //      MainFrame.this.textArea.setText(null);
@@ -2653,7 +2652,7 @@
     try {
       if (doCasReset) {
         // Change to Initial view
-        this.cas = this.cas.getView(CommonCas.NAME_DEFAULT_SOFA);
+        this.cas = this.cas.getView(CAS.NAME_DEFAULT_SOFA);
         this.cas.reset();
         setLanguage();
         this.cas.setDocumentText(this.textArea.getText());
@@ -2665,15 +2664,15 @@
       this.disableSofaListener = true;
       int currentViewID = this.sofaSelectionComboBox.getSelectedIndex();
       this.sofaSelectionComboBox.removeAllItems();
-      this.sofaSelectionComboBox.addItem(CommonCas.NAME_DEFAULT_SOFA);
+      this.sofaSelectionComboBox.addItem(CAS.NAME_DEFAULT_SOFA);
       Iterator sofas = ((CASImpl) MainFrame.this.cas).getBaseCAS().getSofaIterator();
       Feature sofaIdFeat = MainFrame.this.cas.getTypeSystem().getFeatureByFullName(
-	  CommonCas.FEATURE_FULL_NAME_SOFAID);
+	  CAS.FEATURE_FULL_NAME_SOFAID);
       boolean nonDefaultSofaFound = false;
       while (sofas.hasNext()) {
         SofaFS sofa = (SofaFS) sofas.next();
         String sofaId = sofa.getStringValue(sofaIdFeat);
-        if (!CommonCas.NAME_DEFAULT_SOFA.equals(sofaId)) {
+        if (!CAS.NAME_DEFAULT_SOFA.equals(sofaId)) {
           this.sofaSelectionComboBox.addItem(sofaId);
           nonDefaultSofaFound = true;
         }