directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1198855 - /directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/PartitionDetailsPage.java
Date Mon, 07 Nov 2011 18:22:53 GMT
Author: pamarcelot
Date: Mon Nov  7 18:22:53 2011
New Revision: 1198855

URL: http://svn.apache.org/viewvc?rev=1198855&view=rev
Log:
Disabled ID and Suffix text widget when editing the system partition.

Modified:
    directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/PartitionDetailsPage.java

Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/PartitionDetailsPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/PartitionDetailsPage.java?rev=1198855&r1=1198854&r2=1198855&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/PartitionDetailsPage.java
(original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/PartitionDetailsPage.java
Mon Nov  7 18:22:53 2011
@@ -318,14 +318,15 @@ public class PartitionDetailsPage implem
         // Edit button
         indexesEditButton = toolkit.createButton( indexedAttributesClient, "Edit", SWT.PUSH
);
         indexesEditButton.setEnabled( false );
-        indexesEditButton.setLayoutData( createNewButtonGridData());
+        indexesEditButton.setLayoutData( createNewButtonGridData() );
 
         // Delete button
         indexesDeleteButton = toolkit.createButton( indexedAttributesClient, "Delete", SWT.PUSH
);
         indexesDeleteButton.setEnabled( false );
         indexesDeleteButton.setLayoutData( createNewButtonGridData() );
     }
-    
+
+
     /**
      * Create a new button grid data.
      *
@@ -460,9 +461,13 @@ public class PartitionDetailsPage implem
     {
         removeListeners();
 
+        // Checking if the selected partition is the system partition
+        boolean isPartition = PartitionsPage.isSystemPartition( input );
+
         // ID
         String id = input.getPartitionId();
         idText.setText( ( id == null ) ? "" : id ); //$NON-NLS-1$
+        idText.setEnabled( !isPartition );
 
         // Cache Size
         cacheSizeText.setText( "" + input.getPartitionCacheSize() ); //$NON-NLS-1$
@@ -470,6 +475,7 @@ public class PartitionDetailsPage implem
         // Suffix
         Dn suffix = input.getPartitionSuffix();
         suffixText.setText( ( suffix == null ) ? "" : suffix.toString() ); //$NON-NLS-1$
+        suffixText.setEnabled( !isPartition );
 
         // Enable Optimizer
         enableOptimizerCheckbox.setSelection( input.isJdbmPartitionOptimizerEnabled() );



Mime
View raw message