1 package org
.argeo
.slc
.ide
.ui
.launch
.osgi
;
3 import org
.argeo
.slc
.ide
.ui
.SlcIdeUiPlugin
;
4 import org
.eclipse
.core
.resources
.IFile
;
5 import org
.eclipse
.core
.resources
.IResource
;
6 import org
.eclipse
.core
.runtime
.CoreException
;
7 import org
.eclipse
.core
.runtime
.IProgressMonitor
;
8 import org
.eclipse
.debug
.core
.ILaunch
;
9 import org
.eclipse
.debug
.core
.ILaunchConfiguration
;
10 import org
.eclipse
.debug
.core
.ILaunchConfigurationWorkingCopy
;
11 import org
.eclipse
.pde
.launching
.EquinoxLaunchConfiguration
;
13 /** OSGiBoot launch configuration. */
14 public class OsgiBootEquinoxLaunchConfiguration
extends
15 EquinoxLaunchConfiguration
{
16 public final static String ID
= SlcIdeUiPlugin
.ID
17 + ".OsgiBootEquinoxLauncher";
20 public void launch(ILaunchConfiguration configuration
, String mode
,
21 ILaunch launch
, IProgressMonitor monitor
) throws CoreException
{
22 super.launch(configuration
, mode
, launch
, monitor
);
24 // System.out.println("targetBundles="
25 // + configuration.getAttribute(
26 // IPDELauncherConstants.TARGET_BUNDLES, ""));
27 // System.out.println("workspaceBundles="
28 // + configuration.getAttribute(
29 // IPDELauncherConstants.WORKSPACE_BUNDLES, ""));
31 // Refresh resources before launching
32 final IFile propertiesFile
= (IFile
) configuration
.getMappedResources()[0];
33 propertiesFile
.getParent().refreshLocal(IResource
.DEPTH_INFINITE
,
38 protected void preLaunchCheck(ILaunchConfiguration configuration
,
39 ILaunch launch
, IProgressMonitor monitor
) throws CoreException
{
40 // System.out.println("Launching... " + launch);
41 ILaunchConfigurationWorkingCopy wc
= configuration
.getWorkingCopy();
42 OsgiLaunchHelper
.updateLaunchConfiguration(wc
, false);
44 super.preLaunchCheck(configuration
, launch
, monitor
);
46 // Note that if a Java project contains a build.properties it has to
47 // declare the sources otherwise it will be skipped in the generation of
48 // the dev.properties file!
50 // for(Object bundleId:fAllBundles.keySet()){
51 // System.out.println(bundleId+"="+fAllBundles.get(bundleId));