directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r690783 - in /directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards: NewAttributeTypeGeneralWizardPage.java NewObjectClassGeneralPageWizardPage.java NewSchemaWizardPage.java
Date Sun, 31 Aug 2008 21:18:40 GMT
Author: pamarcelot
Date: Sun Aug 31 14:18:39 2008
New Revision: 690783

URL: http://svn.apache.org/viewvc?rev=690783&view=rev
Log:
Fix for DIRSTUDIO-384 (Improve New Attribute Type, New Object Class and New Schema Wizards
when no schema project is opened).

Modified:
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewAttributeTypeGeneralWizardPage.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewObjectClassGeneralPageWizardPage.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewSchemaWizardPage.java

Modified: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewAttributeTypeGeneralWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewAttributeTypeGeneralWizardPage.java?rev=690783&r1=690782&r2=690783&view=diff
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewAttributeTypeGeneralWizardPage.java
(original)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewAttributeTypeGeneralWizardPage.java
Sun Aug 31 14:18:39 2008
@@ -269,9 +269,6 @@
         initFields();
 
         setControl( composite );
-
-        displayErrorMessage( null );
-        setPageComplete( false );
     }
 
 
@@ -280,9 +277,19 @@
      */
     private void initFields()
     {
-        // Filling the Schemas table
-        if ( schemaHandler != null )
+        if ( schemaHandler == null )
+        {
+            schemaComboViewer.getCombo().setEnabled( false );
+            oidCombo.setEnabled( false );
+            aliasesText.setEnabled( false );
+            aliasesButton.setEnabled( false );
+            descriptionText.setEnabled( false );
+
+            displayErrorMessage( "A schema project must be opened before adding a new attribute
type." );
+        }
+        else
         {
+            // Filling the Schemas table
             List<Schema> schemas = new ArrayList<Schema>();
             schemas.addAll( schemaHandler.getSchemas() );
 
@@ -300,7 +307,11 @@
             {
                 schemaComboViewer.setSelection( new StructuredSelection( selectedSchema )
);
             }
+
+            displayErrorMessage( null );
         }
+
+        setPageComplete( false );
     }
 
 

Modified: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewObjectClassGeneralPageWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewObjectClassGeneralPageWizardPage.java?rev=690783&r1=690782&r2=690783&view=diff
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewObjectClassGeneralPageWizardPage.java
(original)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewObjectClassGeneralPageWizardPage.java
Sun Aug 31 14:18:39 2008
@@ -269,9 +269,6 @@
         initFields();
 
         setControl( composite );
-
-        displayErrorMessage( null );
-        setPageComplete( false );
     }
 
 
@@ -280,9 +277,19 @@
      */
     private void initFields()
     {
-        // Filling the Schemas table
-        if ( schemaHandler != null )
+        if ( schemaHandler == null )
+        {
+            schemaComboViewer.getCombo().setEnabled( false );
+            oidCombo.setEnabled( false );
+            aliasesText.setEnabled( false );
+            aliasesButton.setEnabled( false );
+            descriptionText.setEnabled( false );
+
+            displayErrorMessage( "A schema project must be opened before adding a new object
class." );
+        }
+        else
         {
+            // Filling the Schemas table
             List<Schema> schemas = new ArrayList<Schema>();
             schemas.addAll( schemaHandler.getSchemas() );
 
@@ -300,7 +307,11 @@
             {
                 schemaComboViewer.setSelection( new StructuredSelection( selectedSchema )
);
             }
+
+            displayErrorMessage( null );
         }
+
+        setPageComplete( false );
     }
 
 

Modified: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewSchemaWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewSchemaWizardPage.java?rev=690783&r1=690782&r2=690783&view=diff
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewSchemaWizardPage.java
(original)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewSchemaWizardPage.java
Sun Aug 31 14:18:39 2008
@@ -96,8 +96,16 @@
      */
     private void initFields()
     {
-        displayErrorMessage( null );
-        setPageComplete( false );
+        if ( Activator.getDefault().getSchemaHandler() == null )
+        {
+            nameText.setEnabled( false );
+            displayErrorMessage( "A schema project must be opened before adding a new schema."
);
+        }
+        else
+        {
+            displayErrorMessage( null );
+            setPageComplete( false );
+        }
     }
 
 



Mime
View raw message