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
);
22 // Refresh resources before launching
23 final IFile propertiesFile
= (IFile
) configuration
.getMappedResources()[0];
24 propertiesFile
.getParent().refreshLocal(IResource
.DEPTH_INFINITE
,
29 protected void preLaunchCheck(ILaunchConfiguration configuration
,
30 ILaunch launch
, IProgressMonitor monitor
) throws CoreException
{
31 ILaunchConfigurationWorkingCopy wc
= configuration
.getWorkingCopy();
32 OsgiLaunchHelper
.updateLaunchConfiguration(wc
, true);
35 super.preLaunchCheck(configuration
, launch
, monitor
);
37 // Note that if a Java project contains a build.properties it has to
38 // declare the sources otherwise it will be skipped in the generation of
39 // the dev.properties file!