directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r670449 [1/3] - in /directory/studio/trunk: connection-core/src/main/java/org/apache/directory/studio/connection/core/ connection-core/src/main/java/org/apache/directory/studio/connection/core/io/ connection-core/src/main/java/org/apache/di...
Date Mon, 23 Jun 2008 05:20:24 GMT
Author: seelmann
Date: Sun Jun 22 22:20:21 2008
New Revision: 670449

URL: http://svn.apache.org/viewvc?rev=670449&view=rev
Log:
Refactored some Jobs to Runnables

Added:
    directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CheckBindRunnable.java
      - copied, changed from r670090, directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CheckBindJob.java
    directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CheckNetworkParameterRunnable.java
      - copied, changed from r670090, directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CheckNetworkParameterJob.java
    directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CloseConnectionsRunnable.java
      - copied, changed from r670090, directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CloseConnectionsJob.java
    directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/OpenConnectionsRunnable.java
      - copied, changed from r670090, directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/OpenConnectionsJob.java
    directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/StudioBulkRunnableWithProgress.java
    directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/StudioConnectionJob.java
    directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/StudioProgressMonitor.java
      - copied, changed from r670090, directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/StudioProgressMonitor.java
    directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/StudioRunnableWithProgress.java
    directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/RunnableContextRunner.java
      - copied, changed from r670090, directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/RunnableContextJobAdapter.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CreateEntryRunnable.java
      - copied, changed from r670090, directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CreateEntryJob.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/FetchBaseDNsRunnable.java
      - copied, changed from r670090, directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/FetchBaseDNsJob.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeAttributesRunnable.java
      - copied, changed from r670090, directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeAttributesJob.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeChildrenRunnable.java
      - copied, changed from r670090, directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeChildrenJob.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReadEntryRunnable.java
      - copied, changed from r670090, directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReadEntryJob.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReloadSchemaRunnable.java
      - copied, changed from r670090, directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReloadSchemasJob.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SearchRunnable.java
      - copied, changed from r670090, directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SearchJob.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/StudioBrowserJob.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/FilterAndSortRunnable.java
      - copied, changed from r670090, directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/FilterAndSortJob.java
Removed:
    directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/StudioProgressMonitor.java
    directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/AbstractAsyncBulkJob.java
    directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/AbstractConnectionJob.java
    directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CheckBindJob.java
    directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CheckNetworkParameterJob.java
    directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CloseConnectionsJob.java
    directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/OpenConnectionsJob.java
    directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/RunnableContextJobAdapter.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/jobs/
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CreateEntryJob.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/FetchBaseDNsJob.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeAttributesJob.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeChildrenJob.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReadEntryJob.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ReloadSchemasJob.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/SearchJob.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/FilterAndSortJob.java
Modified:
    directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/IConnectionListener.java
    directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionWrapper.java
    directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java
    directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/StudioNamingEnumeration.java
    directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/CloseConnectionAction.java
    directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/DeleteAction.java
    directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/OpenConnectionAction.java
    directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/properties/ConnectionPropertyPage.java
    directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/AuthenticationParameterPage.java
    directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/NetworkParameterPage.java
    directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/wizards/NewConnectionWizard.java
    directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/wizards/NewConnectionWizardPage.java
    directory/studio/trunk/ldapbrowser-common/META-INF/MANIFEST.MF
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/FilterChildrenAction.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/RefreshAction.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/UnfilterChildrenAction.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/browser/BrowserContentProvider.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/connection/BrowserParameterPage.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetContentProvider.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/EntryWidget.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/search/SearchPageWrapper.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/BrowserConnectionListener.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/AbstractAttributeModificationJob.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/AbstractEclipseJob.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/AbstractNotificationJob.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CopyEntriesJob.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/CreateValuesJob.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/DeleteAttributesValueJob.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/DeleteEntriesJob.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExecuteLdifJob.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportCsvJob.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportDsmlJob.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportLdifJob.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ExportXlsJob.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportDsmlJob.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ImportLdifJob.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/ModifyValueJob.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/MoveEntriesJob.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/RenameEntryJob.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/RenameValuesJob.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyEntryAsAction.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/LocateInDitAction.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/MoveAction.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/EntryPropertyPage.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/SchemaPropertyPage.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/ReloadSchemaAction.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorContentProvider.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/connection/ConnectionViewUniversalListener.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/BatchOperationWizard.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryDnWizardPage.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryTypeWizardPage.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewEntryWizard.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/Project.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/AbstractSchemaConnector.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/ApacheDsSchemaConnector.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/model/io/SchemaConnector.java
    directory/studio/trunk/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/wizards/NewProjectWizard.java
    directory/studio/trunk/test-integration-core/src/main/java/org/apache/directory/studio/test/integration/core/JNDIConnectionWrapperTest.java
    directory/studio/trunk/test-integration-ui/src/main/java/org/apache/directory/studio/test/integration/ui/AutomatedSuite.java
    directory/studio/trunk/test-integration-ui/src/main/java/org/apache/directory/studio/test/integration/ui/NewConnectionWizardTest.java
    directory/studio/trunk/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/password/PasswordDialog.java

Modified: directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/IConnectionListener.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/IConnectionListener.java?rev=670449&r1=670448&r2=670449&view=diff
==============================================================================
--- directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/IConnectionListener.java (original)
+++ directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/IConnectionListener.java Sun Jun 22 22:20:21 2008
@@ -19,6 +19,8 @@
  */
 package org.apache.directory.studio.connection.core;
 
+import org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor;
+
 
 /**
  * A Connection Listener is informed when a connection is opened or closed. 

Modified: directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionWrapper.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionWrapper.java?rev=670449&r1=670448&r2=670449&view=diff
==============================================================================
--- directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionWrapper.java (original)
+++ directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionWrapper.java Sun Jun 22 22:20:21 2008
@@ -20,7 +20,7 @@
 package org.apache.directory.studio.connection.core.io;
 
 
-import org.apache.directory.studio.connection.core.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor;
 
 
 /**

Modified: directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java?rev=670449&r1=670448&r2=670449&view=diff
==============================================================================
--- directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java (original)
+++ directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/JNDIConnectionWrapper.java Sun Jun 22 22:20:21 2008
@@ -59,12 +59,12 @@
 import org.apache.directory.studio.connection.core.IJndiLogger;
 import org.apache.directory.studio.connection.core.IReferralHandler;
 import org.apache.directory.studio.connection.core.Messages;
-import org.apache.directory.studio.connection.core.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.Connection.AliasDereferencingMethod;
 import org.apache.directory.studio.connection.core.Connection.ReferralHandlingMethod;
 import org.apache.directory.studio.connection.core.event.ConnectionEventRegistry;
 import org.apache.directory.studio.connection.core.io.ConnectionWrapper;
 import org.apache.directory.studio.connection.core.io.jndi.ReferralsInfo.UrlAndDn;
+import org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor;
 
 
 /**

Modified: directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/StudioNamingEnumeration.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/StudioNamingEnumeration.java?rev=670449&r1=670448&r2=670449&view=diff
==============================================================================
--- directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/StudioNamingEnumeration.java (original)
+++ directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/io/jndi/StudioNamingEnumeration.java Sun Jun 22 22:20:21 2008
@@ -32,10 +32,10 @@
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
 import org.apache.directory.studio.connection.core.IJndiLogger;
-import org.apache.directory.studio.connection.core.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.Connection.AliasDereferencingMethod;
 import org.apache.directory.studio.connection.core.Connection.ReferralHandlingMethod;
 import org.apache.directory.studio.connection.core.io.jndi.ReferralsInfo.UrlAndDn;
+import org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor;
 
 
 /**

Copied: directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CheckBindRunnable.java (from r670090, directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CheckBindJob.java)
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CheckBindRunnable.java?p2=directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CheckBindRunnable.java&p1=directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CheckBindJob.java&r1=670090&r2=670449&rev=670449&view=diff
==============================================================================
--- directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CheckBindJob.java (original)
+++ directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CheckBindRunnable.java Sun Jun 22 22:20:21 2008
@@ -22,17 +22,16 @@
 
 
 import org.apache.directory.studio.connection.core.Connection;
-import org.apache.directory.studio.connection.core.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.Messages;
 
 
 /**
- * Job to check binding (authentication) to a directory server
+ * Runnable to check binding (authentication) to a directory server
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class CheckBindJob extends AbstractConnectionJob
+public class CheckBindRunnable implements StudioRunnableWithProgress
 {
 
     private Connection connection;
@@ -43,17 +42,16 @@
      * 
      * @param connection the connection
      */
-    public CheckBindJob( Connection connection )
+    public CheckBindRunnable( Connection connection )
     {
         this.connection = connection;
-        setName( Messages.jobs__check_bind_name );
     }
 
 
     /**
-     * @see org.apache.directory.studio.connection.core.jobs.AbstractConnectionJob#getLockedObjects()
+     * {@inheritDoc}
      */
-    protected Object[] getLockedObjects()
+    public Object[] getLockedObjects()
     {
         return new Object[]
             { connection };
@@ -61,9 +59,18 @@
 
 
     /**
-     * @see org.apache.directory.studio.connection.core.jobs.AbstractConnectionJob#executeAsyncJob(org.apache.directory.studio.connection.core.StudioProgressMonitor)
+     * {@inheritDoc}
      */
-    protected void executeAsyncJob( StudioProgressMonitor monitor )
+    public String getName()
+    {
+        return Messages.jobs__check_bind_name;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void run( StudioProgressMonitor monitor )
     {
         monitor.beginTask( Messages.jobs__check_bind_task, 4 );
         monitor.reportProgress( " " ); //$NON-NLS-1$
@@ -76,11 +83,19 @@
 
 
     /**
-     * @see org.apache.directory.studio.connection.core.jobs.AbstractConnectionJob#getErrorMessage()
+     * {@inheritDoc}
      */
-    protected String getErrorMessage()
+    public String getErrorMessage()
     {
         return Messages.jobs__check_bind_error;
     }
 
+
+    /**
+     * {@inheritDoc}
+     */
+    public Connection[] getConnections()
+    {
+        return null;
+    }
 }

Copied: directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CheckNetworkParameterRunnable.java (from r670090, directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CheckNetworkParameterJob.java)
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CheckNetworkParameterRunnable.java?p2=directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CheckNetworkParameterRunnable.java&p1=directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CheckNetworkParameterJob.java&r1=670090&r2=670449&rev=670449&view=diff
==============================================================================
--- directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CheckNetworkParameterJob.java (original)
+++ directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CheckNetworkParameterRunnable.java Sun Jun 22 22:20:21 2008
@@ -22,18 +22,17 @@
 
 
 import org.apache.directory.studio.connection.core.Connection;
-import org.apache.directory.studio.connection.core.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.Messages;
 
 
 /**
- * Job to check if a connection to a directory server could be established
+ * Runnable to check if a connection to a directory server could be established
  * using the given connection parmeter.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class CheckNetworkParameterJob extends AbstractConnectionJob
+public class CheckNetworkParameterRunnable implements StudioRunnableWithProgress
 {
 
     private Connection connection;
@@ -44,17 +43,16 @@
      * 
      * @param connection the connection
      */
-    public CheckNetworkParameterJob( Connection connection )
+    public CheckNetworkParameterRunnable( Connection connection )
     {
         this.connection = connection;
-        setName( Messages.jobs__check_network_name );
     }
 
 
     /**
-     * @see org.apache.directory.studio.connection.core.jobs.AbstractConnectionJob#getLockedObjects()
+     * {@inheritDoc}
      */
-    protected Object[] getLockedObjects()
+    public Object[] getLockedObjects()
     {
         return new Object[]
             { connection };
@@ -62,9 +60,18 @@
 
 
     /**
-     * @see org.apache.directory.studio.connection.core.jobs.AbstractConnectionJob#executeAsyncJob(org.apache.directory.studio.connection.core.StudioProgressMonitor)
+     * {@inheritDoc}
      */
-    protected void executeAsyncJob( StudioProgressMonitor monitor )
+    public String getName()
+    {
+        return Messages.jobs__check_network_name;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void run( StudioProgressMonitor monitor )
     {
         monitor.beginTask( Messages.jobs__check_network_task, 3 );
         monitor.reportProgress( " " ); //$NON-NLS-1$
@@ -76,11 +83,19 @@
 
 
     /**
-     * @see org.apache.directory.studio.connection.core.jobs.AbstractConnectionJob#getErrorMessage()
+     * {@inheritDoc}
      */
-    protected String getErrorMessage()
+    public String getErrorMessage()
     {
         return Messages.jobs__check_network_error;
     }
 
+
+    /**
+     * {@inheritDoc}
+     */
+    public Connection[] getConnections()
+    {
+        return null;
+    }
 }

Copied: directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CloseConnectionsRunnable.java (from r670090, directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CloseConnectionsJob.java)
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CloseConnectionsRunnable.java?p2=directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CloseConnectionsRunnable.java&p1=directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CloseConnectionsJob.java&r1=670090&r2=670449&rev=670449&view=diff
==============================================================================
--- directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CloseConnectionsJob.java (original)
+++ directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/CloseConnectionsRunnable.java Sun Jun 22 22:20:21 2008
@@ -21,21 +21,22 @@
 package org.apache.directory.studio.connection.core.jobs;
 
 
+import java.util.List;
+
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
 import org.apache.directory.studio.connection.core.IConnectionListener;
 import org.apache.directory.studio.connection.core.Messages;
-import org.apache.directory.studio.connection.core.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.event.ConnectionEventRegistry;
 
 
 /**
- * Job to close a connection to a directory server.
+ * Runnable to close a connection to a directory server.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class CloseConnectionsJob extends AbstractAsyncBulkJob
+public class CloseConnectionsRunnable implements StudioBulkRunnableWithProgress
 {
 
     private Connection[] connections;
@@ -46,7 +47,7 @@
      * 
      * @param connection the connection
      */
-    public CloseConnectionsJob( Connection connection )
+    public CloseConnectionsRunnable( Connection connection )
     {
         this( new Connection[]
             { connection } );
@@ -58,27 +59,46 @@
      * 
      * @param connections the connections
      */
-    public CloseConnectionsJob( Connection[] connections )
+    public CloseConnectionsRunnable( Connection[] connections )
     {
         this.connections = connections;
-        setName( connections.length == 1 ? Messages.jobs__close_connections_name_1
-            : Messages.jobs__close_connections_name_n );
     }
 
 
     /**
-     * @see org.apache.directory.studio.connection.core.jobs.AbstractConnectionJob#getLockedObjects()
+     * Creates a new instance of CloseConnectionsJob.
+     * 
+     * @param connections the connections
+     */
+    public CloseConnectionsRunnable( List<Connection> connections )
+    {
+        this.connections = connections.toArray( new Connection[connections.size()] );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getName()
+    {
+        return connections.length == 1 ? Messages.jobs__close_connections_name_1
+            : Messages.jobs__close_connections_name_n;
+    }
+
+
+    /**
+     * {@inheritDoc}
      */
-    protected Object[] getLockedObjects()
+    public Object[] getLockedObjects()
     {
         return connections;
     }
 
 
     /**
-     * @see org.apache.directory.studio.connection.core.jobs.AbstractConnectionJob#getErrorMessage()
+     * {@inheritDoc}
      */
-    protected String getErrorMessage()
+    public String getErrorMessage()
     {
         return connections.length == 1 ? Messages.jobs__close_connections_error_1
             : Messages.jobs__close_connections_error_n;
@@ -86,11 +106,10 @@
 
 
     /**
-     * @see org.apache.directory.studio.connection.core.jobs.AbstractAsyncBulkJob#executeBulkJob(org.apache.directory.studio.connection.core.StudioProgressMonitor)
+     * {@inheritDoc}
      */
-    protected void executeBulkJob( StudioProgressMonitor monitor )
+    public void run( StudioProgressMonitor monitor )
     {
-
         monitor.beginTask( " ", connections.length * 6 + 1 ); //$NON-NLS-1$
         monitor.reportProgress( " " ); //$NON-NLS-1$
 
@@ -121,9 +140,9 @@
 
 
     /**
-     * @see org.apache.directory.studio.connection.core.jobs.AbstractAsyncBulkJob#runNotification()
+     * {@inheritDoc}
      */
-    protected void runNotification()
+    public void runNotification()
     {
         for ( Connection connection : connections )
         {
@@ -134,4 +153,12 @@
         }
     }
 
+
+    /**
+     * {@inheritDoc}
+     */
+    public Connection[] getConnections()
+    {
+        return null;
+    }
 }

Copied: directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/OpenConnectionsRunnable.java (from r670090, directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/OpenConnectionsJob.java)
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/OpenConnectionsRunnable.java?p2=directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/OpenConnectionsRunnable.java&p1=directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/OpenConnectionsJob.java&r1=670090&r2=670449&rev=670449&view=diff
==============================================================================
--- directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/OpenConnectionsJob.java (original)
+++ directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/OpenConnectionsRunnable.java Sun Jun 22 22:20:21 2008
@@ -25,17 +25,16 @@
 import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
 import org.apache.directory.studio.connection.core.IConnectionListener;
 import org.apache.directory.studio.connection.core.Messages;
-import org.apache.directory.studio.connection.core.StudioProgressMonitor;
 import org.apache.directory.studio.connection.core.event.ConnectionEventRegistry;
 
 
 /**
- * Job to open a connection to a directory server.
+ * Runnable to open a connection to a directory server.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class OpenConnectionsJob extends AbstractAsyncBulkJob
+public class OpenConnectionsRunnable implements StudioBulkRunnableWithProgress
 {
 
     private Connection[] connections;
@@ -46,7 +45,7 @@
      * 
      * @param connection the connection
      */
-    public OpenConnectionsJob( Connection connection )
+    public OpenConnectionsRunnable( Connection connection )
     {
         this( new Connection[]
             { connection } );
@@ -58,27 +57,35 @@
      * 
      * @param connections the connections
      */
-    public OpenConnectionsJob( Connection[] connections )
+    public OpenConnectionsRunnable( Connection[] connections )
     {
         this.connections = connections;
-        setName( connections.length == 1 ? Messages.jobs__open_connections_name_1
-            : Messages.jobs__open_connections_name_n );
     }
 
 
     /**
-     * @see org.apache.directory.studio.connection.core.jobs.AbstractConnectionJob#getLockedObjects()
+     * {@inheritDoc}
      */
-    protected Object[] getLockedObjects()
+    public String getName()
+    {
+        return connections.length == 1 ? Messages.jobs__open_connections_name_1
+            : Messages.jobs__open_connections_name_n;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public Object[] getLockedObjects()
     {
         return connections;
     }
 
 
     /**
-     * @see org.apache.directory.studio.connection.core.jobs.AbstractConnectionJob#getErrorMessage()
+     * {@inheritDoc}
      */
-    protected String getErrorMessage()
+    public String getErrorMessage()
     {
         return connections.length == 1 ? Messages.jobs__open_connections_error_1
             : Messages.jobs__open_connections_error_n;
@@ -86,9 +93,9 @@
 
 
     /**
-     * @see org.apache.directory.studio.connection.core.jobs.AbstractAsyncBulkJob#executeBulkJob(org.apache.directory.studio.connection.core.StudioProgressMonitor)
+     * {@inheritDoc}
      */
-    protected void executeBulkJob( StudioProgressMonitor monitor )
+    public void run( StudioProgressMonitor monitor )
     {
         monitor.beginTask( " ", connections.length * 6 + 1 ); //$NON-NLS-1$
         monitor.reportProgress( " " ); //$NON-NLS-1$
@@ -120,9 +127,9 @@
 
 
     /**
-     * @see org.apache.directory.studio.connection.core.jobs.AbstractAsyncBulkJob#runNotification()
+     * {@inheritDoc}
      */
-    protected void runNotification()
+    public void runNotification()
     {
         for ( Connection connection : connections )
         {
@@ -133,4 +140,12 @@
         }
     }
 
+
+    /**
+     * {@inheritDoc}
+     */
+    public Connection[] getConnections()
+    {
+        return null;
+    }
 }

Added: directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/StudioBulkRunnableWithProgress.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/StudioBulkRunnableWithProgress.java?rev=670449&view=auto
==============================================================================
--- directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/StudioBulkRunnableWithProgress.java (added)
+++ directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/StudioBulkRunnableWithProgress.java Sun Jun 22 22:20:21 2008
@@ -0,0 +1,42 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+
+package org.apache.directory.studio.connection.core.jobs;
+
+
+
+
+/**
+ * A runnable with a progess monitor. When invoked by the {@link StudioConnectionJob} 
+ * during the run() method all event notifications are blocked and the runNotification()
+ * method is called afterwards to fire event notifications.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface StudioBulkRunnableWithProgress extends StudioRunnableWithProgress
+{
+
+    /**
+     * Runs notification, called by {@link StudioConnectionJob} after the run() method.
+     */
+    public void runNotification();
+
+}

Added: directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/StudioConnectionJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/StudioConnectionJob.java?rev=670449&view=auto
==============================================================================
--- directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/StudioConnectionJob.java (added)
+++ directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/StudioConnectionJob.java Sun Jun 22 22:20:21 2008
@@ -0,0 +1,296 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+
+package org.apache.directory.studio.connection.core.jobs;
+
+
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
+import org.apache.directory.studio.connection.core.IConnectionListener;
+import org.apache.directory.studio.connection.core.Messages;
+import org.apache.directory.studio.connection.core.event.ConnectionEventRegistry;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+
+
+/**
+ * Job to run a {@link StudioRunnableWithProgress}.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class StudioConnectionJob extends Job
+{
+
+    /** The runnable. */
+    private StudioRunnableWithProgress runnable;
+
+    /** The external progress monitor. */
+    private IProgressMonitor externalProgressMonitor;
+
+    /** The external result. */
+    private IStatus externalResult;
+
+
+    /**
+     * Creates a new instance of AbstractConnectionJob.
+     */
+    public StudioConnectionJob( StudioRunnableWithProgress runnable )
+    {
+        super( runnable.getName() ); //$NON-NLS-1$
+        this.runnable = runnable;
+    }
+
+
+    /**
+     * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
+     */
+    protected final IStatus run( IProgressMonitor ipm )
+    {
+        StudioProgressMonitor monitor = new StudioProgressMonitor( externalProgressMonitor == null ? ipm
+            : externalProgressMonitor );
+
+        // ensure that connections are opened
+        Connection[] connections = runnable.getConnections();
+        if ( connections != null )
+        {
+            for ( Connection connection : connections )
+            {
+                if ( connection != null && !connection.getJNDIConnectionWrapper().isConnected() )
+                {
+                    monitor.setTaskName( Messages.bind( Messages.jobs__open_connections_task, new String[]
+                        { connection.getName() } ) );
+                    monitor.worked( 1 );
+
+                    connection.getJNDIConnectionWrapper().connect( monitor );
+                    connection.getJNDIConnectionWrapper().bind( monitor );
+
+                    if ( connection.getJNDIConnectionWrapper().isConnected() )
+                    {
+                        for ( IConnectionListener listener : ConnectionCorePlugin.getDefault().getConnectionListeners() )
+                        {
+                            listener.connectionOpened( connection, monitor );
+                        }
+                        ConnectionEventRegistry.fireConnectionOpened( connection, this );
+                    }
+                }
+            }
+        }
+
+        // execute job
+        if ( !monitor.errorsReported() )
+        {
+            try
+            {
+                if ( runnable instanceof StudioBulkRunnableWithProgress )
+                {
+                    StudioBulkRunnableWithProgress bulkRunnable = ( StudioBulkRunnableWithProgress ) runnable;
+                    suspendEventFireingInCurrentThread();
+                    try
+                    {
+                        bulkRunnable.run( monitor );
+                    }
+                    finally
+                    {
+                        resumeEventFireingInCurrentThread();
+                    }
+                    bulkRunnable.runNotification();
+                }
+                else
+                {
+                    System.out.println( "NoBulk: " + runnable );
+                    runnable.run( monitor );
+                }
+
+            }
+            catch ( Exception e )
+            {
+                monitor.reportError( e );
+            }
+            finally
+            {
+                monitor.done();
+                ipm.done();
+            }
+        }
+
+        // error handling
+        if ( monitor.isCanceled() )
+        {
+            // System.out.println("Job: CANCEL+CANCEL");
+            externalResult = Status.CANCEL_STATUS;
+            return Status.CANCEL_STATUS;
+        }
+        else if ( monitor.errorsReported() )
+        {
+            externalResult = monitor.getErrorStatus( runnable.getErrorMessage() );
+            if ( externalProgressMonitor == null )
+            {
+                // System.out.println("Job: ERROR+ERROR");
+                return externalResult;
+            }
+            else
+            {
+                // System.out.println("Job: ERROR+OK");
+                return Status.OK_STATUS;
+            }
+        }
+        else
+        {
+            // System.out.println("Job: OK+OK");
+            externalResult = Status.OK_STATUS;
+            return Status.OK_STATUS;
+        }
+    }
+
+
+    /**
+     * Suspends event fireing in current thread.
+     */
+    protected void suspendEventFireingInCurrentThread()
+    {
+        ConnectionEventRegistry.suspendEventFireingInCurrentThread();
+    }
+
+
+    /**
+     * Resumes event fireing in current thread.
+     */
+    protected void resumeEventFireingInCurrentThread()
+    {
+        ConnectionEventRegistry.resumeEventFireingInCurrentThread();
+    }
+
+
+//    /**
+//     * Sets the external progress monitor.
+//     * 
+//     * @param externalProgressMonitor the external progress monitor
+//     */
+//    public void setExternalProgressMonitor( IProgressMonitor externalProgressMonitor )
+//    {
+//        this.externalProgressMonitor = externalProgressMonitor;
+//    }
+//
+//
+//    /**
+//     * Gets the result of the executed job. Either Status.OK_STATUS, 
+//     * Status.CANCEL_STATUS or an error status.
+//     * 
+//     * @return the result of the executed job
+//     */
+//    public IStatus getExternalResult()
+//    {
+//        return this.externalResult;
+//    }
+
+
+    /**
+     * Executes the job.
+     */
+    public final void execute()
+    {
+        setUser( true );
+        schedule();
+    }
+
+
+    /**
+     * @see org.eclipse.core.runtime.jobs.Job#shouldSchedule()
+     */
+    public boolean shouldSchedule()
+    {
+        Object[] myLockedObjects = runnable.getLockedObjects();
+        String[] myLockedObjectsIdentifiers = getLockIdentifiers( myLockedObjects );
+
+        // TODO: read, write
+
+        Job[] jobs = getJobManager().find( null );
+        for ( int i = 0; i < jobs.length; i++ )
+        {
+            Job job = jobs[i];
+
+            // if(job instanceof AbstractEclipseJob) {
+            if ( job.getClass() == this.getClass() && job != this )
+            {
+                StudioConnectionJob otherJob = ( StudioConnectionJob ) job;
+                Object[] otherLockedObjects = otherJob.runnable.getLockedObjects();
+                String[] otherLockedObjectIdentifiers = getLockIdentifiers( otherLockedObjects );
+
+                for ( int j = 0; j < otherLockedObjectIdentifiers.length; j++ )
+                {
+                    String other = otherLockedObjectIdentifiers[j];
+                    for ( int k = 0; k < myLockedObjectsIdentifiers.length; k++ )
+                    {
+                        String my = myLockedObjectsIdentifiers[k];
+
+                        //System.out.print( "other:" + other + ", my: " + my );
+                        if ( other.startsWith( my ) || my.startsWith( other ) )
+                        {
+                            //System.out.println( ", shouldSchedule() = " + false );
+                            return false;
+                        }
+                        else
+                        {
+                            //System.out.println();
+                        }
+
+                    }
+                }
+
+            }
+        }
+        return super.shouldSchedule();
+    }
+
+
+    private static String[] getLockIdentifiers( Object[] objects )
+    {
+        String[] identifiers = new String[objects.length];
+        for ( int i = 0; i < identifiers.length; i++ )
+        {
+            Object o = objects[i];
+            if ( o instanceof Connection )
+            {
+                identifiers[i] = getLockIdentifier( ( Connection ) o );
+            }
+            else
+            {
+                identifiers[i] = getLockIdentifier( objects[i] );
+            }
+        }
+        return identifiers;
+    }
+
+
+    private static String getLockIdentifier( Connection connection )
+    {
+        return connection.getHost() + ":" + connection.getPort();
+    }
+
+
+    private static String getLockIdentifier( Object object )
+    {
+        return object.toString();
+    }
+
+}

Copied: directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/StudioProgressMonitor.java (from r670090, directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/StudioProgressMonitor.java)
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/StudioProgressMonitor.java?p2=directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/StudioProgressMonitor.java&p1=directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/StudioProgressMonitor.java&r1=670090&r2=670449&rev=670449&view=diff
==============================================================================
--- directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/StudioProgressMonitor.java (original)
+++ directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/StudioProgressMonitor.java Sun Jun 22 22:20:21 2008
@@ -18,13 +18,16 @@
  *  
  */
 
-package org.apache.directory.studio.connection.core;
+package org.apache.directory.studio.connection.core.jobs;
 
 
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
 
+import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
+import org.apache.directory.studio.connection.core.Messages;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.MultiStatus;
@@ -51,41 +54,44 @@
         {
             while ( true )
             {
-                for ( Iterator<StudioProgressMonitor> it = monitors.iterator(); it.hasNext(); )
+                synchronized ( monitors )
                 {
-                    StudioProgressMonitor spm = it.next();
-
-                    do
+                    for ( Iterator<StudioProgressMonitor> it = monitors.iterator(); it.hasNext(); )
                     {
-                        // check report progress message
-                        if ( !spm.done && spm.reportProgressMessage != null )
-                        {
-                            spm.subTask( spm.reportProgressMessage );
-                            spm.reportProgressMessage = null;
-                        }
-
-                        // check if canceled
-                        if ( spm.isCanceled() )
-                        {
-                            spm.fireCancelRequested();
-                            it.remove();
-                        }
-                        if ( spm.isCanceled() || spm.done )
-                        {
-                            it.remove();
-                        }
-
-                        if ( spm.getWrappedProgressMonitor() != null
-                            && spm.getWrappedProgressMonitor() instanceof StudioProgressMonitor )
-                        {
-                            spm = ( StudioProgressMonitor ) spm.getWrappedProgressMonitor();
-                        }
-                        else
+                        StudioProgressMonitor next = it.next();
+                        StudioProgressMonitor spm = next;
+    
+                        do
                         {
-                            spm = null;
+                            // check report progress message
+                            if ( !spm.done && spm.reportProgressMessage != null )
+                            {
+                                spm.subTask( spm.reportProgressMessage );
+                                spm.reportProgressMessage = null;
+                            }
+    
+                            // check if canceled
+                            if ( spm.isCanceled() )
+                            {
+                                spm.fireCancelRequested();
+                            }
+                            if ( spm == next && ( spm.isCanceled() || spm.done ) )
+                            {
+                                it.remove();
+                            }
+    
+                            if ( spm.getWrappedProgressMonitor() != null
+                                && spm.getWrappedProgressMonitor() instanceof StudioProgressMonitor )
+                            {
+                                spm = ( StudioProgressMonitor ) spm.getWrappedProgressMonitor();
+                            }
+                            else
+                            {
+                                spm = null;
+                            }
                         }
+                        while ( spm != null );
                     }
-                    while ( spm != null );
                 }
 
                 try
@@ -104,7 +110,8 @@
         reportProgressAndCheckCancellationJob.schedule();
     }
 
-    private static List<StudioProgressMonitor> monitors = new ArrayList<StudioProgressMonitor>();
+    private static List<StudioProgressMonitor> monitors = Collections
+        .synchronizedList( new ArrayList<StudioProgressMonitor>() );
 
     private boolean done;
 

Added: directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/StudioRunnableWithProgress.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/StudioRunnableWithProgress.java?rev=670449&view=auto
==============================================================================
--- directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/StudioRunnableWithProgress.java (added)
+++ directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/StudioRunnableWithProgress.java Sun Jun 22 22:20:21 2008
@@ -0,0 +1,73 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+
+package org.apache.directory.studio.connection.core.jobs;
+
+import org.apache.directory.studio.connection.core.Connection;
+
+
+/**
+ * A runnable with a progress monitor.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface StudioRunnableWithProgress
+{
+
+    /**
+     * Runs the runnable.
+     * 
+     * @param monitor the monitor
+     */
+    public void run( StudioProgressMonitor monitor );
+
+
+    /**
+     * Gets the locked objects.
+     * 
+     * @return the locked objects
+     */
+    public Object[] getLockedObjects();
+
+
+    /**
+     * Gets the error message.
+     * 
+     * @return the error message
+     */
+    public String getErrorMessage();
+
+
+    /**
+     * Gets the name that is used when reporting progress.
+     * 
+     * @return the name
+     */
+    public String getName();
+
+
+    /**
+     * Gets the connections that must be opened before running this runnable.
+     * 
+     * @return the connections, null if none
+     */
+    public Connection[] getConnections();
+}

Copied: directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/RunnableContextRunner.java (from r670090, directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/RunnableContextJobAdapter.java)
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/RunnableContextRunner.java?p2=directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/RunnableContextRunner.java&p1=directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/RunnableContextJobAdapter.java&r1=670090&r2=670449&rev=670449&view=diff
==============================================================================
--- directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/RunnableContextJobAdapter.java (original)
+++ directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/RunnableContextRunner.java Sun Jun 22 22:20:21 2008
@@ -18,112 +18,106 @@
  *  
  */
 
-package org.apache.directory.studio.connection.ui.widgets;
+package org.apache.directory.studio.connection.ui;
 
 
-import org.apache.directory.studio.connection.core.jobs.AbstractConnectionJob;
-import org.apache.directory.studio.connection.ui.ConnectionUIPlugin;
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
+import org.apache.directory.studio.connection.core.IConnectionListener;
+import org.apache.directory.studio.connection.core.Messages;
+import org.apache.directory.studio.connection.core.jobs.StudioProgressMonitor;
+import org.apache.directory.studio.connection.core.jobs.StudioRunnableWithProgress;
+import org.apache.directory.studio.connection.core.event.ConnectionEventRegistry;
+import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.jface.dialogs.ProgressMonitorDialog;
 import org.eclipse.jface.operation.IRunnableContext;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.swt.widgets.Display;
 
 
 /**
- * This class provides some convinience methods to execute a job within
+ * This class provides some convenience methods to execute a runnable within
  * an {@link IRunnableContext}.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-public class RunnableContextJobAdapter
+public class RunnableContextRunner
 {
 
     /**
-     * Executes the given job within a new {@link ProgressMonitorDialog}.
-     *
-     * @param job the job to execute
-     */
-    public static void execute( final AbstractConnectionJob job )
-    {
-        execute( job, null );
-    }
-
-
-    /**
-     * Executes the given job within the given runnable context and enabled error handling
-     * 
-     * @param runnableContext the runnable context
-     * @param job the job to execute
-     */
-    public static void execute( final AbstractConnectionJob job, IRunnableContext runnableContext )
-    {
-        execute( job, runnableContext, true );
-    }
-
-
-    /**
      * Executes the given job within the given runnable context.
      * 
-     * @param runnableContext the runnable context
-     * @param job the job to execute
+     * @param runnable the runnable to execute
+     * @param runnableContext the runnable context or null to create a progress monitor dialog
      * @param handleError true to handle errors
      */
-    public static void execute( final AbstractConnectionJob job, IRunnableContext runnableContext, boolean handleError )
+    public static IStatus execute( final StudioRunnableWithProgress runnable, IRunnableContext runnableContext,
+        boolean handleError )
     {
+        if ( runnableContext == null )
+        {
+            runnableContext = new ProgressMonitorDialog( Display.getDefault().getActiveShell() );
+        }
+
+        final StudioProgressMonitor[] spm = new StudioProgressMonitor[1];
+        IRunnableWithProgress runnableWithProgress = new IRunnableWithProgress()
+        {
+            public void run( IProgressMonitor monitor ) throws InterruptedException
+            {
+                spm[0] = new StudioProgressMonitor( monitor );
+                
+                // ensure that connections are opened
+                Connection[] connections = runnable.getConnections();
+                if ( connections != null )
+                {
+                    for ( Connection connection : connections )
+                    {
+                        if ( connection != null && !connection.getJNDIConnectionWrapper().isConnected() )
+                        {
+                            spm[0].setTaskName( Messages.bind( Messages.jobs__open_connections_task, new String[]
+                                { connection.getName() } ) );
+                            spm[0].worked( 1 );
+            
+                            connection.getJNDIConnectionWrapper().connect( spm[0] );
+                            connection.getJNDIConnectionWrapper().bind( spm[0] );
+
+                            if ( connection.getJNDIConnectionWrapper().isConnected() )
+                            {
+                                for ( IConnectionListener listener : ConnectionCorePlugin.getDefault().getConnectionListeners() )
+                                {
+                                    listener.connectionOpened( connection, spm[0] );
+                                }
+                                ConnectionEventRegistry.fireConnectionOpened( connection, this );
+                            }
+                        }
+                    }
+                }
+                
+                runnable.run( spm[0] );
+            }
+        };
+
         try
         {
-            job.setExternalProgressMonitor( new NullProgressMonitor() );
-            job.execute();
-            job.join();
+            runnableContext.run( true, true, runnableWithProgress );
         }
-        catch ( InterruptedException ex )
+        catch ( Exception ex )
         {
             ConnectionUIPlugin.getDefault().getExceptionHandler().handleException(
                 new Status( IStatus.ERROR, ConnectionUIPlugin.PLUGIN_ID, IStatus.ERROR, ex.getMessage() != null ? ex
                     .getMessage() : "", ex ) );
         }
 
-        if ( handleError && !job.getExternalResult().isOK() )
+        IStatus status = spm[0].getErrorStatus( runnable.getErrorMessage() );
+        if ( handleError && !spm[0].isCanceled() && !status.isOK() )
         {
-            IStatus status = job.getExternalResult();
             ConnectionUIPlugin.getDefault().getExceptionHandler().handleException( status );
         }
 
-        // TODO: There seems to be a bug in the runnableContext.run( true, true, runnable ) method
-        // that allocates an SWT cursor but doesn't dispose it.
-//        if ( runnableContext == null )
-//        {
-//            runnableContext = new ProgressMonitorDialog( Display.getDefault().getActiveShell() );
-//        }
-//
-//        IRunnableWithProgress runnable = new IRunnableWithProgress()
-//        {
-//            public void run( IProgressMonitor ipm ) throws InterruptedException
-//            {
-//                job.setExternalProgressMonitor( ipm );
-//                job.execute();
-//                job.join();
-//            }
-//        };
-//
-//        try
-//        {
-//            runnableContext.run( true, true, runnable );
-//        }
-//        catch ( Exception ex )
-//        {
-//            ConnectionUIPlugin.getDefault().getExceptionHandler().handleException(
-//                new Status( IStatus.ERROR, ConnectionUIPlugin.PLUGIN_ID, IStatus.ERROR, ex.getMessage() != null ? ex
-//                    .getMessage() : "", ex ) );
-//        }
-//
-//        if ( handleError && !job.getExternalResult().isOK() )
-//        {
-//            IStatus status = job.getExternalResult();
-//            ConnectionUIPlugin.getDefault().getExceptionHandler().handleException( status );
-//        }
+        return status;
     }
 
 }

Modified: directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/CloseConnectionAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/CloseConnectionAction.java?rev=670449&r1=670448&r2=670449&view=diff
==============================================================================
--- directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/CloseConnectionAction.java (original)
+++ directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/CloseConnectionAction.java Sun Jun 22 22:20:21 2008
@@ -21,7 +21,8 @@
 package org.apache.directory.studio.connection.ui.actions;
 
 
-import org.apache.directory.studio.connection.core.jobs.CloseConnectionsJob;
+import org.apache.directory.studio.connection.core.jobs.CloseConnectionsRunnable;
+import org.apache.directory.studio.connection.core.jobs.StudioConnectionJob;
 import org.apache.directory.studio.connection.ui.ConnectionUIConstants;
 import org.apache.directory.studio.connection.ui.ConnectionUIPlugin;
 import org.eclipse.jface.resource.ImageDescriptor;
@@ -43,15 +44,14 @@
     {
         super();
     }
-    
-    
+
+
     /**
      * @see org.apache.directory.studio.connection.ui.actions.StudioAction#run()
      */
     public void run()
     {
-        CloseConnectionsJob ccj = new CloseConnectionsJob( getSelectedConnections() );
-        ccj.execute();
+        new StudioConnectionJob( new CloseConnectionsRunnable( getSelectedConnections() ) ).execute();
     }
 
 

Modified: directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/DeleteAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/DeleteAction.java?rev=670449&r1=670448&r2=670449&view=diff
==============================================================================
--- directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/DeleteAction.java (original)
+++ directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/DeleteAction.java Sun Jun 22 22:20:21 2008
@@ -29,7 +29,8 @@
 import org.apache.directory.studio.connection.core.ConnectionCoreConstants;
 import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
 import org.apache.directory.studio.connection.core.ConnectionFolder;
-import org.apache.directory.studio.connection.core.jobs.CloseConnectionsJob;
+import org.apache.directory.studio.connection.core.jobs.CloseConnectionsRunnable;
+import org.apache.directory.studio.connection.core.jobs.StudioConnectionJob;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.ui.ISharedImages;
@@ -235,7 +236,7 @@
      */
     private void deleteConnections( List<Connection> connectionsToDelete )
     {
-        new CloseConnectionsJob( connectionsToDelete.toArray( new Connection[connectionsToDelete.size()] ) ).execute();
+        new StudioConnectionJob( new CloseConnectionsRunnable( connectionsToDelete ) ).execute();
         for ( Connection connection : connectionsToDelete )
         {
             ConnectionCorePlugin.getDefault().getConnectionManager().removeConnection( connection);

Modified: directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/OpenConnectionAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/OpenConnectionAction.java?rev=670449&r1=670448&r2=670449&view=diff
==============================================================================
--- directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/OpenConnectionAction.java (original)
+++ directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/actions/OpenConnectionAction.java Sun Jun 22 22:20:21 2008
@@ -21,7 +21,8 @@
 package org.apache.directory.studio.connection.ui.actions;
 
 
-import org.apache.directory.studio.connection.core.jobs.OpenConnectionsJob;
+import org.apache.directory.studio.connection.core.jobs.OpenConnectionsRunnable;
+import org.apache.directory.studio.connection.core.jobs.StudioConnectionJob;
 import org.apache.directory.studio.connection.ui.ConnectionUIConstants;
 import org.apache.directory.studio.connection.ui.ConnectionUIPlugin;
 import org.eclipse.jface.resource.ImageDescriptor;
@@ -49,8 +50,7 @@
      */
     public void run()
     {
-        OpenConnectionsJob ocj = new OpenConnectionsJob( getSelectedConnections() );
-        ocj.execute();
+        new StudioConnectionJob( new OpenConnectionsRunnable( getSelectedConnections() ) ).execute();
     }
 
 

Modified: directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/properties/ConnectionPropertyPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/properties/ConnectionPropertyPage.java?rev=670449&r1=670448&r2=670449&view=diff
==============================================================================
--- directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/properties/ConnectionPropertyPage.java (original)
+++ directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/properties/ConnectionPropertyPage.java Sun Jun 22 22:20:21 2008
@@ -24,7 +24,8 @@
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.ConnectionParameter;
 import org.apache.directory.studio.connection.core.Utils;
-import org.apache.directory.studio.connection.core.jobs.CloseConnectionsJob;
+import org.apache.directory.studio.connection.core.jobs.CloseConnectionsRunnable;
+import org.apache.directory.studio.connection.core.jobs.StudioConnectionJob;
 import org.apache.directory.studio.connection.ui.ConnectionParameterPage;
 import org.apache.directory.studio.connection.ui.ConnectionParameterPageManager;
 import org.apache.directory.studio.connection.ui.ConnectionParameterPageModifyListener;
@@ -244,7 +245,7 @@
             if ( reconnectionRequired )
             {
                 // close connection
-                new CloseConnectionsJob( connection ).execute();
+                new StudioConnectionJob( new CloseConnectionsRunnable( connection ) ).execute();
             }
         }
 

Modified: directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/AuthenticationParameterPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/AuthenticationParameterPage.java?rev=670449&r1=670448&r2=670449&view=diff
==============================================================================
--- directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/AuthenticationParameterPage.java (original)
+++ directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/AuthenticationParameterPage.java Sun Jun 22 22:20:21 2008
@@ -25,9 +25,11 @@
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.ConnectionParameter;
 import org.apache.directory.studio.connection.core.ConnectionParameter.AuthenticationMethod;
-import org.apache.directory.studio.connection.core.jobs.CheckBindJob;
+import org.apache.directory.studio.connection.core.jobs.CheckBindRunnable;
 import org.apache.directory.studio.connection.ui.AbstractConnectionParameterPage;
 import org.apache.directory.studio.connection.ui.ConnectionUIConstants;
+import org.apache.directory.studio.connection.ui.RunnableContextRunner;
+import org.eclipse.core.runtime.IStatus;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ModifyEvent;
@@ -43,6 +45,7 @@
 import org.eclipse.swt.widgets.Text;
 
 
+
 /**
  * The AuthenticationParameterPage is used the edit the authentication parameters of a
  * connection.
@@ -332,9 +335,9 @@
             public void widgetSelected( SelectionEvent e )
             {
                 Connection connection = getTestConnection();
-                CheckBindJob job = new CheckBindJob( connection );
-                RunnableContextJobAdapter.execute( job, runnableContext );
-                if ( job.getExternalResult().isOK() )
+                CheckBindRunnable runnable = new CheckBindRunnable( connection );
+                IStatus status = RunnableContextRunner.execute( runnable, runnableContext, true );
+                if ( status.isOK() )
                 {
                     MessageDialog.openInformation( Display.getDefault().getActiveShell(), "Check Authentication",
                         "The authentication was successful." );

Modified: directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/NetworkParameterPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/NetworkParameterPage.java?rev=670449&r1=670448&r2=670449&view=diff
==============================================================================
--- directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/NetworkParameterPage.java (original)
+++ directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/widgets/NetworkParameterPage.java Sun Jun 22 22:20:21 2008
@@ -26,9 +26,11 @@
 import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
 import org.apache.directory.studio.connection.core.ConnectionParameter;
 import org.apache.directory.studio.connection.core.ConnectionParameter.EncryptionMethod;
-import org.apache.directory.studio.connection.core.jobs.CheckNetworkParameterJob;
+import org.apache.directory.studio.connection.core.jobs.CheckNetworkParameterRunnable;
 import org.apache.directory.studio.connection.ui.AbstractConnectionParameterPage;
 import org.apache.directory.studio.connection.ui.ConnectionUIConstants;
+import org.apache.directory.studio.connection.ui.RunnableContextRunner;
+import org.eclipse.core.runtime.IStatus;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ModifyEvent;
@@ -299,9 +301,9 @@
             public void widgetSelected( SelectionEvent event )
             {
                 Connection connection = getTestConnection();
-                CheckNetworkParameterJob job = new CheckNetworkParameterJob( connection );
-                RunnableContextJobAdapter.execute( job, runnableContext );
-                if ( job.getExternalResult().isOK() )
+                CheckNetworkParameterRunnable runnable = new CheckNetworkParameterRunnable( connection );
+                IStatus status = RunnableContextRunner.execute( runnable, runnableContext, true );
+                if ( status.isOK() )
                 {
                     MessageDialog.openInformation( Display.getDefault().getActiveShell(), "Check Network Parameter",
                         "The connection was established successfully." );

Modified: directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/wizards/NewConnectionWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/wizards/NewConnectionWizard.java?rev=670449&r1=670448&r2=670449&view=diff
==============================================================================
--- directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/wizards/NewConnectionWizard.java (original)
+++ directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/wizards/NewConnectionWizard.java Sun Jun 22 22:20:21 2008
@@ -25,7 +25,8 @@
 import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
 import org.apache.directory.studio.connection.core.ConnectionFolder;
 import org.apache.directory.studio.connection.core.ConnectionParameter;
-import org.apache.directory.studio.connection.core.jobs.OpenConnectionsJob;
+import org.apache.directory.studio.connection.core.jobs.OpenConnectionsRunnable;
+import org.apache.directory.studio.connection.core.jobs.StudioConnectionJob;
 import org.apache.directory.studio.connection.ui.ConnectionParameterPage;
 import org.apache.directory.studio.connection.ui.ConnectionParameterPageManager;
 import org.eclipse.jface.viewers.IStructuredSelection;
@@ -111,6 +112,7 @@
         {
             wizardPages[i] = new NewConnectionWizardPage( this, pages[i] );
             addPage( wizardPages[i] );
+            pages[i].setRunnableContext( getContainer() );
         }
     }
 
@@ -168,7 +170,7 @@
         selectedConnectionFolder.addConnectionId( conn.getId() );
 
         // open connection
-        new OpenConnectionsJob( conn ).execute();
+        new StudioConnectionJob( new OpenConnectionsRunnable( conn ) ).execute();
 
         return true;
     }

Modified: directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/wizards/NewConnectionWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/wizards/NewConnectionWizardPage.java?rev=670449&r1=670448&r2=670449&view=diff
==============================================================================
--- directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/wizards/NewConnectionWizardPage.java (original)
+++ directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/wizards/NewConnectionWizardPage.java Sun Jun 22 22:20:21 2008
@@ -63,8 +63,6 @@
             ConnectionUIConstants.IMG_CONNECTION_WIZARD ) );
         setPageComplete( false );
 
-        page.setRunnableContext( getContainer() );
-
         this.wizard = wizard;
         this.page = page;
     }

Modified: directory/studio/trunk/ldapbrowser-common/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/META-INF/MANIFEST.MF?rev=670449&r1=670448&r2=670449&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/META-INF/MANIFEST.MF (original)
+++ directory/studio/trunk/ldapbrowser-common/META-INF/MANIFEST.MF Sun Jun 22 22:20:21 2008
@@ -24,7 +24,6 @@
  org.apache.directory.studio.ldapbrowser.common.dialogs.preferences,
  org.apache.directory.studio.ldapbrowser.common.dnd,
  org.apache.directory.studio.ldapbrowser.common.filtereditor,
- org.apache.directory.studio.ldapbrowser.common.jobs,
  org.apache.directory.studio.ldapbrowser.common.widgets,
  org.apache.directory.studio.ldapbrowser.common.widgets.browser,
  org.apache.directory.studio.ldapbrowser.common.widgets.connection,

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/FilterChildrenAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/FilterChildrenAction.java?rev=670449&r1=670448&r2=670449&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/FilterChildrenAction.java (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/FilterChildrenAction.java Sun Jun 22 22:20:21 2008
@@ -24,9 +24,9 @@
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonConstants;
 import org.apache.directory.studio.ldapbrowser.common.dialogs.FilterWidgetDialog;
-import org.apache.directory.studio.ldapbrowser.core.jobs.InitializeChildrenJob;
+import org.apache.directory.studio.ldapbrowser.core.jobs.InitializeChildrenRunnable;
+import org.apache.directory.studio.ldapbrowser.core.jobs.StudioBrowserJob;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
-
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.resource.ImageDescriptor;
 
@@ -72,8 +72,8 @@
                 {
                     getSelectedEntries()[0].setChildrenFilter( newFilter.trim() );
                 }
-                new InitializeChildrenJob( new IEntry[]
-                    { getSelectedEntries()[0] } ).execute();
+                new StudioBrowserJob( new InitializeChildrenRunnable( new IEntry[]
+                    { getSelectedEntries()[0] } ) ).execute();
 
             }
         }

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/RefreshAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/RefreshAction.java?rev=670449&r1=670448&r2=670449&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/RefreshAction.java (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/RefreshAction.java Sun Jun 22 22:20:21 2008
@@ -27,9 +27,10 @@
 
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonConstants;
-import org.apache.directory.studio.ldapbrowser.core.jobs.InitializeAttributesJob;
-import org.apache.directory.studio.ldapbrowser.core.jobs.InitializeChildrenJob;
-import org.apache.directory.studio.ldapbrowser.core.jobs.SearchJob;
+import org.apache.directory.studio.ldapbrowser.core.jobs.InitializeAttributesRunnable;
+import org.apache.directory.studio.ldapbrowser.core.jobs.InitializeChildrenRunnable;
+import org.apache.directory.studio.ldapbrowser.core.jobs.SearchRunnable;
+import org.apache.directory.studio.ldapbrowser.core.jobs.StudioBrowserJob;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
 import org.eclipse.jface.resource.ImageDescriptor;
@@ -133,23 +134,23 @@
 
         if ( entries.length > 0 )
         {
-            new InitializeAttributesJob( entries, soa ).execute();
-            new InitializeChildrenJob( entries ).execute();
+            new StudioBrowserJob( new InitializeAttributesRunnable( entries, soa ) ).execute();
+            new StudioBrowserJob( new InitializeChildrenRunnable( entries ) ).execute();
         }
         if ( searches.length > 0 )
         {
-            new SearchJob( searches ).execute();
+            new StudioBrowserJob( new SearchRunnable( searches ) ).execute();
         }
 
         if ( entryInput != null )
         {
-            new InitializeAttributesJob( new IEntry[]
-                { entryInput }, soa ).execute();
+            new StudioBrowserJob( new InitializeAttributesRunnable( new IEntry[]
+                { entryInput }, soa ) ).execute();
         }
         if ( searchInput != null )
         {
-            new SearchJob( new ISearch[]
-                { searchInput } ).execute();
+            new StudioBrowserJob( new SearchRunnable( new ISearch[]
+                { searchInput } ) ).execute();
         }
     }
 

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/UnfilterChildrenAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/UnfilterChildrenAction.java?rev=670449&r1=670448&r2=670449&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/UnfilterChildrenAction.java (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/UnfilterChildrenAction.java Sun Jun 22 22:20:21 2008
@@ -23,7 +23,8 @@
 
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonConstants;
-import org.apache.directory.studio.ldapbrowser.core.jobs.InitializeChildrenJob;
+import org.apache.directory.studio.ldapbrowser.core.jobs.InitializeChildrenRunnable;
+import org.apache.directory.studio.ldapbrowser.core.jobs.StudioBrowserJob;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
 import org.eclipse.jface.resource.ImageDescriptor;
 
@@ -53,8 +54,8 @@
         if ( getSelectedEntries().length == 1 )
         {
             getSelectedEntries()[0].setChildrenFilter( null );
-            new InitializeChildrenJob( new IEntry[]
-                { getSelectedEntries()[0] } ).execute();
+            new StudioBrowserJob( new InitializeChildrenRunnable( new IEntry[]
+                { getSelectedEntries()[0] } ) ).execute();
         }
     }
 



Mime
View raw message