directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r981852 - /directory/studio/trunk/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/wizards/NewServerWizard.java
Date Tue, 03 Aug 2010 12:57:42 GMT
Author: pamarcelot
Date: Tue Aug  3 12:57:42 2010
New Revision: 981852

URL: http://svn.apache.org/viewvc?rev=981852&view=rev
Log:
Cleaning in the usage of the StudioProgressMonitor.

Modified:
    directory/studio/trunk/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/wizards/NewServerWizard.java

Modified: directory/studio/trunk/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/wizards/NewServerWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/wizards/NewServerWizard.java?rev=981852&r1=981851&r2=981852&view=diff
==============================================================================
--- directory/studio/trunk/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/wizards/NewServerWizard.java
(original)
+++ directory/studio/trunk/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/wizards/NewServerWizard.java
Tue Aug  3 12:57:42 2010
@@ -22,7 +22,6 @@ package org.apache.directory.studio.ldap
 
 import org.apache.directory.studio.common.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.ldapservers.LdapServersManager;
-import org.apache.directory.studio.ldapservers.LdapServersPluginConstants;
 import org.apache.directory.studio.ldapservers.model.LdapServer;
 import org.apache.directory.studio.ldapservers.model.LdapServerAdapterExtension;
 import org.eclipse.core.runtime.IProgressMonitor;
@@ -69,9 +68,12 @@ public class NewServerWizard extends Wiz
             {
                 public void run( IProgressMonitor monitor )
                 {
+                    // Creating a StudioProgressMonitor
+                    StudioProgressMonitor spm = new StudioProgressMonitor( monitor );
+
                     // Setting the title
-                    monitor.beginTask( "Creating LDAP Server: ", IProgressMonitor.UNKNOWN
);
-                    monitor.subTask( "creating server folder" );
+                    spm.beginTask( "Creating LDAP Server: ", IProgressMonitor.UNKNOWN );
+                    spm.subTask( "creating server folder" );
 
                     // Creating the new server
                     LdapServer server = new LdapServer();
@@ -87,8 +89,7 @@ public class NewServerWizard extends Wiz
                     // Letting the LDAP Server Adapter finish the creation of the server
                     try
                     {
-                        adapterExtension.getInstance().add( server,
-                            new StudioProgressMonitor( LdapServersPluginConstants.PLUGIN_ID,
monitor ) ); // TODO
+                        adapterExtension.getInstance().add( server, spm );
                     }
                     catch ( Exception e )
                     {
@@ -96,8 +97,8 @@ public class NewServerWizard extends Wiz
                         e.printStackTrace();
                     }
 
-                    // Reporting to the monitor that we're done
-                    monitor.done();
+                    // Reporting to the monitors that we're done
+                    spm.done();
                 }
             } );
         }



Mime
View raw message