directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r690904 - in /directory/studio/trunk/connection-core: ./ src/main/java/org/apache/directory/studio/connection/core/ src/main/java/org/apache/directory/studio/connection/core/jobs/
Date Mon, 01 Sep 2008 08:13:08 GMT
Author: pamarcelot
Date: Mon Sep  1 01:13:08 2008
New Revision: 690904

URL: http://svn.apache.org/viewvc?rev=690904&view=rev
Log:
Part of a fix for DIRSTUDIO-375 (Move each plugin IDs in a plugin.properties file).

Modified:
    directory/studio/trunk/connection-core/plugin.properties
    directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionCoreConstants.java
    directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionCorePlugin.java
    directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionManager.java
    directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/StudioProgressMonitor.java

Modified: directory/studio/trunk/connection-core/plugin.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-core/plugin.properties?rev=690904&r1=690903&r2=690904&view=diff
==============================================================================
--- directory/studio/trunk/connection-core/plugin.properties (original)
+++ directory/studio/trunk/connection-core/plugin.properties Mon Sep  1 01:13:08 2008
@@ -15,6 +15,8 @@
 # specific language governing permissions and limitations
 # under the License.
 
+Plugin_id=org.apache.directory.studio.connection.core
+
 ExtensionPoint_JndiLogger_id=org.apache.directory.studio.jndilogger
 ExtensionPoint_JndiLogger_name=JNDI Logger
 

Modified: directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionCoreConstants.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionCoreConstants.java?rev=690904&r1=690903&r2=690904&view=diff
==============================================================================
--- directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionCoreConstants.java
(original)
+++ directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionCoreConstants.java
Mon Sep  1 01:13:08 2008
@@ -20,6 +20,8 @@
 package org.apache.directory.studio.connection.core;
 
 
+
+
 /**
  * Constants for the connection core plugin.
  *
@@ -28,6 +30,9 @@
  */
 public interface ConnectionCoreConstants
 {
+    /** The plug-in ID */
+    public static final String PLUGIN_ID = ConnectionCorePlugin.getDefault().getPluginProperties().getString(
+        "Plugin_id" );
 
     /** The line separator. */
     public static final String LINE_SEPARATOR = System.getProperty( "line.separator" ); //$NON-NLS-1$

Modified: directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionCorePlugin.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionCorePlugin.java?rev=690904&r1=690903&r2=690904&view=diff
==============================================================================
--- directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionCorePlugin.java
(original)
+++ directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionCorePlugin.java
Mon Sep  1 01:13:08 2008
@@ -46,9 +46,6 @@
  */
 public class ConnectionCorePlugin extends Plugin
 {
-    /** The plug-in ID */
-    public static final String PLUGIN_ID = "org.apache.directory.studio.connection.core";
-
     /** The shared instance */
     private static ConnectionCorePlugin plugin;
 
@@ -299,7 +296,7 @@
                 catch ( Exception e )
                 {
                     getLog().log(
-                        new Status( IStatus.ERROR, ConnectionCorePlugin.PLUGIN_ID, 1, "Unable
to create JNDI logger "
+                        new Status( IStatus.ERROR, ConnectionCoreConstants.PLUGIN_ID, 1,
"Unable to create JNDI logger "
                             + member.getAttribute( "class" ), e ) );
                 }
             }
@@ -337,7 +334,7 @@
                 catch ( Exception e )
                 {
                     getLog().log(
-                        new Status( IStatus.ERROR, ConnectionCorePlugin.PLUGIN_ID, 1,
+                        new Status( IStatus.ERROR, ConnectionCoreConstants.PLUGIN_ID, 1,
                             "Unable to create connection listener " + member.getAttribute(
"class" ), e ) );
                 }
             }
@@ -364,8 +361,10 @@
             }
             catch ( IOException e )
             {
+                // We can't use the PLUGIN_ID constant since loading the plugin.properties
file has failed,
+                // So we're using a default plugin id.
                 getLog().log(
-                    new Status( Status.ERROR, ConnectionCorePlugin.PLUGIN_ID, Status.OK,
+                    new Status( Status.ERROR, "org.apache.directory.studio.connection.core",
Status.OK,
                         "Unable to get the plugin properties.", e ) );
             }
         }

Modified: directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionManager.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionManager.java?rev=690904&r1=690903&r2=690904&view=diff
==============================================================================
--- directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionManager.java
(original)
+++ directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionManager.java
Mon Sep  1 01:13:08 2008
@@ -111,7 +111,7 @@
         }
         catch ( CoreException e )
         {
-            Status status = new Status( IStatus.ERROR, ConnectionCorePlugin.PLUGIN_ID,
+            Status status = new Status( IStatus.ERROR, ConnectionCoreConstants.PLUGIN_ID,
                 "Exception occured while executing connection initializer: " + e.getMessage(),
e );
             ConnectionCorePlugin.getDefault().getLog().log( status );
         }

Modified: directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/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?rev=690904&r1=690903&r2=690904&view=diff
==============================================================================
--- directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/StudioProgressMonitor.java
(original)
+++ directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/StudioProgressMonitor.java
Mon Sep  1 01:13:08 2008
@@ -26,7 +26,7 @@
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.directory.studio.connection.core.ConnectionCorePlugin;
+import org.apache.directory.studio.connection.core.ConnectionCoreConstants;
 import org.apache.directory.studio.connection.core.Messages;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
@@ -260,7 +260,7 @@
                 message = ""; //$NON-NLS-1$
             }
 
-            Status errorStatus = new Status( IStatus.ERROR, ConnectionCorePlugin.PLUGIN_ID,
IStatus.ERROR, message,
+            Status errorStatus = new Status( IStatus.ERROR, ConnectionCoreConstants.PLUGIN_ID,
IStatus.ERROR, message,
                 exception );
             errorStatusList.add( errorStatus );
 
@@ -310,7 +310,7 @@
                 }
             }
 
-            MultiStatus multiStatus = new MultiStatus( ConnectionCorePlugin.PLUGIN_ID, IStatus.ERROR,
message,
+            MultiStatus multiStatus = new MultiStatus( ConnectionCoreConstants.PLUGIN_ID,
IStatus.ERROR, message,
                 exception );
 
             for ( Iterator<Status> it = errorStatusList.iterator(); it.hasNext(); )



Mime
View raw message