You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2013/09/02 17:15:51 UTC

svn commit: r1519462 - /sling/trunk/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingLaunchpadBehaviour.java

Author: rombert
Date: Mon Sep  2 15:15:51 2013
New Revision: 1519462

URL: http://svn.apache.org/r1519462
Log:
SLING-3009 - [Tooling] support auto-deploy of osgi bundles from eclipse
to a running sling launchpad

Support run modes in a more general way - do not deploy the bundle if
the launch mode is set to DEBUG. This way we deploy the bundle even when
in profiling mode, and future modes are better supported.

Modified:
    sling/trunk/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingLaunchpadBehaviour.java

Modified: sling/trunk/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingLaunchpadBehaviour.java
URL: http://svn.apache.org/viewvc/sling/trunk/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingLaunchpadBehaviour.java?rev=1519462&r1=1519461&r2=1519462&view=diff
==============================================================================
--- sling/trunk/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingLaunchpadBehaviour.java (original)
+++ sling/trunk/tooling/ide/eclipse-core/src/org/apache/sling/ide/eclipse/core/internal/SlingLaunchpadBehaviour.java Mon Sep  2 15:15:51 2013
@@ -169,11 +169,12 @@ public class SlingLaunchpadBehaviour ext
         System.out.println(trace.toString());
 
         if (ProjectHelper.isBundleProject(module[0].getProject())) {
-        	if (getServer().getMode().equals(ILaunchManager.RUN_MODE)) {
+            String serverMode = getServer().getMode();
+            if (!serverMode.equals(ILaunchManager.DEBUG_MODE)) {
+                // in debug mode, we rely on the hotcode replacement feature of eclipse/jvm
+                // otherwise, for run and profile modes we explicitly publish the bundle module
+                // TODO: make this configurable as part of the server config
         		publishBundleModule(module, monitor);
-        	} else {
-        		// otherwise, in debug mode, we rely on the hotcode replacement feature of eclipse/jvm
-        		// TODO: make this configurable as part of the server config
         	}
         } else if (ProjectHelper.isContentProject(module[0].getProject())) {
     		publishContentModule(kind, deltaKind, module, monitor); 
@@ -351,7 +352,6 @@ public class SlingLaunchpadBehaviour ext
 //					IWorkbenchWindow aw = workbench.getActiveWorkbenchWindow();
 //					if (aw==null) {
 //						// we're not in the context of a workbench window?
-//						System.err.println("We're not in the context of a workbench window?");
 //					}
 					ILaunchConfiguration launchConfig = 
 							DebugPlugin.getDefault().getLaunchManager().getLaunchConfiguration(aLaunchFile);