directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r443380 - /directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java
Date Thu, 14 Sep 2006 15:07:44 GMT
Author: akarasulu
Date: Thu Sep 14 08:07:43 2006
New Revision: 443380

URL: http://svn.apache.org/viewvc?view=rev&rev=443380
Log:
fixing some menus so they use attribute names instead of OIDs

Modified:
    directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java

Modified: directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java
URL: http://svn.apache.org/viewvc/directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java?view=diff&rev=443380&r1=443379&r2=443380
==============================================================================
--- directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java
(original)
+++ directory/branches/apacheds/1.0/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/PartitionFrame.java
Thu Sep 14 08:07:43 2006
@@ -64,6 +64,7 @@
 
 import org.apache.directory.server.core.partition.impl.btree.BTreePartition;
 import org.apache.directory.server.core.partition.impl.btree.Index;
+import org.apache.directory.server.core.partition.impl.btree.IndexNotFoundException;
 import org.apache.directory.server.core.partition.impl.btree.IndexRecord;
 import org.apache.directory.server.core.partition.impl.btree.SearchEngine;
 
@@ -828,11 +829,21 @@
         while ( list.hasNext() )
         {
             String idx = ( String ) list.next();
+            Index index = null;
+            try
+            {
+                index = partition.getSystemIndex( idx );
+            }
+            catch ( IndexNotFoundException e )
+            {
+                e.printStackTrace();
+            }
+            
             item = new JMenuItem();
             item.setBackground( new java.awt.Color( 205, 205, 205 ) );
             indices.add( item );
-            item.setText( idx );
-            item.setActionCommand( idx );
+            item.setText( index.getAttribute().getName() );
+            item.setActionCommand( index.getAttribute().getName() );
             item.addActionListener( listener );
         }
 
@@ -841,10 +852,20 @@
         while ( list.hasNext() )
         {
             String idx = ( String ) list.next();
+            Index index = null;
+            try
+            {
+                index = partition.getUserIndex( idx );
+            }
+            catch ( IndexNotFoundException e )
+            {
+                e.printStackTrace();
+            }
+            
             item = new JMenuItem();
             item.setBackground( new java.awt.Color( 205, 205, 205 ) );
             indices.add( item );
-            item.setText( idx );
+            item.setText( index.getAttribute().getName() );
             item.setActionCommand( idx );
             item.addActionListener( listener );
         }



Mime
View raw message