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
.EclipseApplicationLaunchConfiguration
;
13 /** OSGiBoot launch configuration. */
14 public class EclipseBootLaunchConfiguration
extends
15 EclipseApplicationLaunchConfiguration
{
16 public final static String ID
= SlcIdeUiPlugin
.ID
+ ".EclipseBootLauncher";
19 public void launch(ILaunchConfiguration configuration
, String mode
,
20 ILaunch launch
, IProgressMonitor monitor
) throws CoreException
{
21 super.launch(configuration
, mode
, launch
, monitor
);
23 // System.out.println("targetBundles="
24 // + configuration.getAttribute(
25 // IPDELauncherConstants.SELECTED_TARGET_PLUGINS, ""));
26 // System.out.println("workspaceBundles="
27 // + configuration.getAttribute(
28 // IPDELauncherConstants.SELECTED_WORKSPACE_PLUGINS, ""));
30 // Refresh resources before launching
31 final IFile propertiesFile
= (IFile
) configuration
.getMappedResources()[0];
32 propertiesFile
.getParent().refreshLocal(IResource
.DEPTH_INFINITE
,
37 protected void preLaunchCheck(ILaunchConfiguration configuration
,
38 ILaunch launch
, IProgressMonitor monitor
) throws CoreException
{
39 ILaunchConfigurationWorkingCopy wc
= configuration
.getWorkingCopy();
40 OsgiLaunchHelper
.updateLaunchConfiguration(wc
, true);
42 super.preLaunchCheck(configuration
, launch
, monitor
);
44 // Note that if a Java project contains a build.properties it has to
45 // declare the sources otherwise it will be skipped in the generation of
46 // the dev.properties file!
48 // for(Object bundleId:fAllBundles.keySet()){
49 // System.out.println(bundleId+"="+fAllBundles.get(bundleId));