directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1063371 - /directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/ServerConfigurationEditor.java
Date Tue, 25 Jan 2011 17:33:20 GMT
Author: pamarcelot
Date: Tue Jan 25 17:33:20 2011
New Revision: 1063371

URL: http://svn.apache.org/viewvc?rev=1063371&view=rev
Log:
Added a listener tracking a page change and triggering a UI refresh of the selected page (some
values might have been modified in other pages).

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

Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/ServerConfigurationEditor.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/ServerConfigurationEditor.java?rev=1063371&r1=1063370&r2=1063371&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/ServerConfigurationEditor.java
(original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/ServerConfigurationEditor.java
Tue Jan 25 17:33:20 2011
@@ -31,6 +31,8 @@ import org.apache.directory.studio.apach
 import org.apache.directory.studio.common.core.jobs.StudioJob;
 import org.apache.directory.studio.common.core.jobs.StudioRunnableWithProgress;
 import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.dialogs.IPageChangedListener;
+import org.eclipse.jface.dialogs.PageChangedEvent;
 import org.eclipse.jface.operation.IRunnableWithProgress;
 import org.eclipse.swt.custom.CTabFolder;
 import org.eclipse.swt.widgets.Composite;
@@ -46,7 +48,7 @@ import org.eclipse.ui.forms.editor.FormE
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ServerConfigurationEditor extends FormEditor
+public class ServerConfigurationEditor extends FormEditor implements IPageChangedListener
 {
     /** The Editor ID */
     public static final String ID = ServerConfigurationEditor.class.getName();
@@ -82,6 +84,8 @@ public class ServerConfigurationEditor e
             setDirty( true );
         }
 
+        addPageChangedListener( this );
+
         readConfiguration();
     }
 
@@ -101,6 +105,20 @@ public class ServerConfigurationEditor e
     /**
      * {@inheritDoc}
      */
+    public void pageChanged( PageChangedEvent event )
+    {
+        Object selectedPage = event.getSelectedPage();
+
+        if ( selectedPage instanceof ServerConfigurationEditorPage )
+        {
+            ( ( ServerConfigurationEditorPage ) selectedPage ).refreshUI();
+        }
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
     protected void addPages()
     {
         try



Mime
View raw message