1 package org
.argeo
.slc
.ide
.ui
.launch
.osgi
;
4 import java
.util
.TreeMap
;
6 import org
.argeo
.slc
.ide
.ui
.SlcIdeUiPlugin
;
7 import org
.eclipse
.core
.resources
.IFile
;
8 import org
.eclipse
.core
.resources
.IResource
;
9 import org
.eclipse
.core
.runtime
.CoreException
;
10 import org
.eclipse
.core
.runtime
.IProgressMonitor
;
11 import org
.eclipse
.debug
.core
.ILaunch
;
12 import org
.eclipse
.debug
.core
.ILaunchConfiguration
;
13 import org
.eclipse
.debug
.core
.ILaunchConfigurationWorkingCopy
;
14 import org
.eclipse
.pde
.launching
.EclipseApplicationLaunchConfiguration
;
16 /** OSGiBoot launch configuration. */
17 public class EclipseBootLaunchConfiguration
extends
18 EclipseApplicationLaunchConfiguration
{
19 public final static String ID
= SlcIdeUiPlugin
.ID
+ ".EclipseBootLauncher";
22 public void launch(ILaunchConfiguration configuration
, String mode
,
23 ILaunch launch
, IProgressMonitor monitor
) throws CoreException
{
24 super.launch(configuration
, mode
, launch
, monitor
);
26 // System.out.println("targetBundles="
27 // + configuration.getAttribute(
28 // IPDELauncherConstants.SELECTED_TARGET_PLUGINS, ""));
29 // System.out.println("workspaceBundles="
30 // + configuration.getAttribute(
31 // IPDELauncherConstants.SELECTED_WORKSPACE_PLUGINS, ""));
33 // Refresh resources before launching
34 final IFile propertiesFile
= (IFile
) configuration
.getMappedResources()[0];
35 propertiesFile
.getParent().refreshLocal(IResource
.DEPTH_INFINITE
,
39 @SuppressWarnings("unchecked")
41 protected void preLaunchCheck(ILaunchConfiguration configuration
,
42 ILaunch launch
, IProgressMonitor monitor
) throws CoreException
{
43 ILaunchConfigurationWorkingCopy wc
= configuration
.getWorkingCopy();
44 OsgiLaunchHelper
.updateLaunchConfiguration(wc
, true);
46 Map
<String
, ?
> attrs
= new TreeMap
<String
, Object
>(
47 (Map
<String
, String
>) wc
.getAttributes());
48 OsgiLaunchHelper
.debug("WC " + wc
);
49 for (String key
: attrs
.keySet())
50 OsgiLaunchHelper
.debug(key
+ "=" + attrs
.get(key
));
52 super.preLaunchCheck(configuration
, launch
, monitor
);
54 // Note that if a Java project contains a build.properties it has to
55 // declare the sources otherwise it will be skipped in the generation of
56 // the dev.properties file!
58 // for(Object bundleId:fAllBundles.keySet()){
59 // System.out.println(bundleId+"="+fAllBundles.get(bundleId));