directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r654129 - in /directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/java/org/apache/directory/studio/apacheds/experimentations: ApacheDsPluginUtils.java jobs/LaunchServerInstanceJob.java
Date Wed, 07 May 2008 14:48:29 GMT
Author: pamarcelot
Date: Wed May  7 07:48:27 2008
New Revision: 654129

URL: http://svn.apache.org/viewvc?rev=654129&view=rev
Log:
Added the studio-apacheds-launcher jar.
Adapted the launch configuration to use it.

Modified:
    directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/java/org/apache/directory/studio/apacheds/experimentations/ApacheDsPluginUtils.java
    directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/java/org/apache/directory/studio/apacheds/experimentations/jobs/LaunchServerInstanceJob.java

Modified: directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/java/org/apache/directory/studio/apacheds/experimentations/ApacheDsPluginUtils.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/java/org/apache/directory/studio/apacheds/experimentations/ApacheDsPluginUtils.java?rev=654129&r1=654128&r2=654129&view=diff
==============================================================================
--- directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/java/org/apache/directory/studio/apacheds/experimentations/ApacheDsPluginUtils.java
(original)
+++ directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/java/org/apache/directory/studio/apacheds/experimentations/ApacheDsPluginUtils.java
Wed May  7 07:48:27 2008
@@ -66,7 +66,7 @@
             "mina-filter-ssl-1.1.2.jar", "shared-asn1-0.9.10.jar", "shared-asn1-codec-0.9.10.jar",
             "shared-bouncycastle-reduced-0.9.10.jar", "shared-ldap-0.9.10.jar", "shared-ldap-constants-0.9.10.jar",
             "slf4j-api-1.4.3.jar", "slf4j-log4j12-1.4.3.jar", "spring-beans-2.0.6.jar", "spring-context-2.0.6.jar",
-            "spring-core-2.0.6.jar", "xbean-spring-3.2.jar" };
+            "spring-core-2.0.6.jar", "studio-apacheds-launcher-0.0.1.jar", "xbean-spring-3.2.jar"
};
 
 
     /**

Modified: directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/java/org/apache/directory/studio/apacheds/experimentations/jobs/LaunchServerInstanceJob.java
URL: http://svn.apache.org/viewvc/directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/java/org/apache/directory/studio/apacheds/experimentations/jobs/LaunchServerInstanceJob.java?rev=654129&r1=654128&r2=654129&view=diff
==============================================================================
--- directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/java/org/apache/directory/studio/apacheds/experimentations/jobs/LaunchServerInstanceJob.java
(original)
+++ directory/sandbox/pamarcelot/studio-apacheds-plugin/studio-apacheds-experimentations/src/main/java/org/apache/directory/studio/apacheds/experimentations/jobs/LaunchServerInstanceJob.java
Wed May  7 07:48:27 2008
@@ -38,6 +38,7 @@
 import org.eclipse.core.runtime.IPath;
 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.core.runtime.jobs.Job;
 import org.eclipse.debug.core.DebugPlugin;
@@ -46,6 +47,7 @@
 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
 import org.eclipse.debug.core.ILaunchManager;
 import org.eclipse.debug.ui.DebugUITools;
+import org.eclipse.debug.ui.IDebugUIConstants;
 import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
 import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
 import org.eclipse.jdt.launching.IVMInstall;
@@ -53,6 +55,7 @@
 import org.eclipse.swt.widgets.Display;
 
 
+
 /**
  * This class implements a {@link Job} that is used to launch a server instance.
  *
@@ -190,7 +193,7 @@
 
         // Setting the main type attribute
         workingCopy.setAttribute( IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME,
-            "org.apache.directory.server.UberjarMain" );
+            "org.apache.directory.studio.apacheds.Launcher" );
 
         // Creating the classpath list
         List classpath = new ArrayList();
@@ -217,7 +220,7 @@
         // Setting the default classpath type attribute to false
         workingCopy.setAttribute( IJavaLaunchConfigurationConstants.ATTR_DEFAULT_CLASSPATH,
false );
 
-        // Useful path
+        // Useful paths
         IPath instancesFolderPath = ApacheDsPluginUtils.getApacheDsInstancesFolder();
         IPath instanceFolderPath = instancesFolderPath.append( serverInstance.getId() );
 
@@ -241,6 +244,8 @@
         // Setting the VM arguments attribute
         workingCopy.setAttribute( IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, vmArguments.toString()
);
 
+        workingCopy.setAttribute( IDebugUIConstants.ATTR_PRIVATE, true );
+
         // Saving to a launch configuration
         ILaunchConfiguration configuration = null;
         try
@@ -254,6 +259,15 @@
         }
 
         // Launching the launch configuration 
-        DebugUITools.launch( configuration, ILaunchManager.RUN_MODE );
+        try
+        {
+            configuration.launch( ILaunchManager.RUN_MODE, new NullProgressMonitor() );
+        }
+        catch ( CoreException e )
+        {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+        //        DebugUITools.launch( configuration, ILaunchManager.RUN_MODE );
     }
 }



Mime
View raw message