directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r800346 - in /directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor: controller/actions/ view/editors/attributetype/ view/editors/objectclass/
Date Mon, 03 Aug 2009 13:07:47 GMT
Author: seelmann
Date: Mon Aug  3 13:07:47 2009
New Revision: 800346

URL: http://svn.apache.org/viewvc?rev=800346&view=rev
Log:
Fix for DIRSTUDIO-497 (LdapSchema plugin 'Save' is erratic)
o Register listener at ComboViewer to avoid dirty state
o Fixed ClassCastException
o Changed layout to avoid space between sections


Modified:
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/LinkWithEditorSchemaViewAction.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/AttributeTypeEditorOverviewPage.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/ObjectClassEditorOverviewPage.java

Modified: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/LinkWithEditorSchemaViewAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/LinkWithEditorSchemaViewAction.java?rev=800346&r1=800345&r2=800346&view=diff
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/LinkWithEditorSchemaViewAction.java
(original)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/controller/actions/LinkWithEditorSchemaViewAction.java
Mon Aug  3 13:07:47 2009
@@ -34,7 +34,7 @@
 import org.eclipse.jface.action.Action;
 import org.eclipse.jface.action.IAction;
 import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ITreeSelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.ui.IEditorPart;
 import org.eclipse.ui.IEditorReference;
@@ -176,7 +176,7 @@
          */
         public void selectionChanged( IWorkbenchPart part, ISelection selection )
         {
-            ITreeSelection iSelection = ( ITreeSelection ) selection;
+            IStructuredSelection iSelection = ( IStructuredSelection ) selection;
 
             Object selectedObject = iSelection.getFirstElement();
 

Modified: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/AttributeTypeEditorOverviewPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/AttributeTypeEditorOverviewPage.java?rev=800346&r1=800345&r2=800346&view=diff
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/AttributeTypeEditorOverviewPage.java
(original)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/attributetype/AttributeTypeEditorOverviewPage.java
Mon Aug  3 13:07:47 2009
@@ -41,6 +41,8 @@
 import org.apache.directory.studio.schemaeditor.view.editors.schema.SchemaEditorInput;
 import org.apache.log4j.Logger;
 import org.eclipse.jface.viewers.ComboViewer;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.window.Window;
 import org.eclipse.swt.SWT;
@@ -381,9 +383,9 @@
     };
 
     /** The listener for the Sup Combo Widget */
-    private ModifyListener supComboListener = new ModifyListener()
+    private ISelectionChangedListener supComboViewerListener = new ISelectionChangedListener()
     {
-        public void modifyText( ModifyEvent e )
+        public void selectionChanged( SelectionChangedEvent event )
         {
             Object selectedItem = ( ( StructuredSelection ) supComboViewer.getSelection()
).getFirstElement();
 
@@ -443,9 +445,9 @@
     };
 
     /** The listener for the Syntax Combo Widget */
-    private ModifyListener syntaxComboListener = new ModifyListener()
+    private ISelectionChangedListener syntaxComboViewerListener = new ISelectionChangedListener()
     {
-        public void modifyText( ModifyEvent e )
+        public void selectionChanged( SelectionChangedEvent event )
         {
             Object selectedItem = ( ( StructuredSelection ) syntaxComboViewer.getSelection()
).getFirstElement();
 
@@ -540,9 +542,9 @@
     };
 
     /** The listener for the Equality Combo Widget */
-    private ModifyListener equalityComboListener = new ModifyListener()
+    private ISelectionChangedListener equalityComboViewerListener = new ISelectionChangedListener()
     {
-        public void modifyText( ModifyEvent e )
+        public void selectionChanged( SelectionChangedEvent event )
         {
             Object selectedItem = ( ( StructuredSelection ) equalityComboViewer.getSelection()
).getFirstElement();
 
@@ -568,9 +570,9 @@
     };
 
     /** The listener for the Ordering Combo Widget */
-    private ModifyListener orderingComboListener = new ModifyListener()
+    private ISelectionChangedListener orderingComboViewerListener = new ISelectionChangedListener()
     {
-        public void modifyText( ModifyEvent e )
+        public void selectionChanged( SelectionChangedEvent event )
         {
             Object selectedItem = ( ( StructuredSelection ) orderingComboViewer.getSelection()
).getFirstElement();
 
@@ -596,9 +598,9 @@
     };
 
     /** The listener for the Substring Combo Widget */
-    private ModifyListener substringComboListener = new ModifyListener()
+    private ISelectionChangedListener substringComboViewerListener = new ISelectionChangedListener()
     {
-        public void modifyText( ModifyEvent e )
+        public void selectionChanged( SelectionChangedEvent event )
         {
             Object selectedItem = ( ( StructuredSelection ) substringComboViewer.getSelection()
).getFirstElement();
 
@@ -1129,18 +1131,18 @@
         schemaLink.addHyperlinkListener( schemaLinkListener );
         descriptionText.addModifyListener( descriptionTextListener );
         supLabel.addHyperlinkListener( supLabelListener );
-        supCombo.addModifyListener( supComboListener );
+        supComboViewer.addSelectionChangedListener( supComboViewerListener );
         usageCombo.addModifyListener( usageComboListener );
-        syntaxCombo.addModifyListener( syntaxComboListener );
+        syntaxComboViewer.addSelectionChangedListener( syntaxComboViewerListener );
         syntaxLengthText.addModifyListener( syntaxLengthTextModifyListener );
         syntaxLengthText.addVerifyListener( syntaxLengthTextVerifyListener );
         obsoleteCheckbox.addSelectionListener( obsoleteCheckboxListener );
         singleValueCheckbox.addSelectionListener( singleValueCheckboxListener );
         collectiveCheckbox.addSelectionListener( collectiveCheckboxListener );
         noUserModificationCheckbox.addSelectionListener( noUserModificationCheckboxListener
);
-        equalityCombo.addModifyListener( equalityComboListener );
-        orderingCombo.addModifyListener( orderingComboListener );
-        substringCombo.addModifyListener( substringComboListener );
+        equalityComboViewer.addSelectionChangedListener( equalityComboViewerListener );
+        orderingComboViewer.addSelectionChangedListener( orderingComboViewerListener );
+        substringComboViewer.addSelectionChangedListener( substringComboViewerListener );
     }
 
 
@@ -1155,18 +1157,18 @@
         schemaLink.removeHyperlinkListener( schemaLinkListener );
         descriptionText.removeModifyListener( descriptionTextListener );
         supLabel.removeHyperlinkListener( supLabelListener );
-        supCombo.removeModifyListener( supComboListener );
+        supComboViewer.removeSelectionChangedListener( supComboViewerListener );
         usageCombo.removeModifyListener( usageComboListener );
-        syntaxCombo.removeModifyListener( syntaxComboListener );
+        syntaxComboViewer.removeSelectionChangedListener( syntaxComboViewerListener );
         syntaxLengthText.removeModifyListener( syntaxLengthTextModifyListener );
         syntaxLengthText.removeVerifyListener( syntaxLengthTextVerifyListener );
         obsoleteCheckbox.removeSelectionListener( obsoleteCheckboxListener );
         singleValueCheckbox.removeSelectionListener( singleValueCheckboxListener );
         collectiveCheckbox.removeSelectionListener( collectiveCheckboxListener );
         noUserModificationCheckbox.removeSelectionListener( noUserModificationCheckboxListener
);
-        equalityCombo.removeModifyListener( equalityComboListener );
-        orderingCombo.removeModifyListener( orderingComboListener );
-        substringCombo.removeModifyListener( substringComboListener );
+        equalityComboViewer.removeSelectionChangedListener( equalityComboViewerListener );
+        orderingComboViewer.removeSelectionChangedListener( orderingComboViewerListener );
+        substringComboViewer.removeSelectionChangedListener( substringComboViewerListener
);
     }
 
 

Modified: directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/ObjectClassEditorOverviewPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/ObjectClassEditorOverviewPage.java?rev=800346&r1=800345&r2=800346&view=diff
==============================================================================
--- directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/ObjectClassEditorOverviewPage.java
(original)
+++ directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/editors/objectclass/ObjectClassEditorOverviewPage.java
Mon Aug  3 13:07:47 2009
@@ -874,7 +874,7 @@
         section_general_information.setDescription( Messages
             .getString( "ObjectClassEditorOverviewPage.SpecifyGeneralInformation" ) );
         section_general_information.setText( Messages.getString( "ObjectClassEditorOverviewPage.GeneralInformation"
) );
-        section_general_information.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true,
true ) );
+        section_general_information.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true,
false ) );
 
         // Creating the layout of the section
         Composite client_general_information = toolkit.createComposite( section_general_information
);



Mime
View raw message