]> git.argeo.org Git - gpl/argeo-slc.git/blob - eclipse/plugins/org.argeo.slc.ide.ui/src/main/java/org/argeo/slc/ide/ui/launch/osgi/EclipseBootLaunchConfiguration.java
Catch all exception types
[gpl/argeo-slc.git] / eclipse / plugins / org.argeo.slc.ide.ui / src / main / java / org / argeo / slc / ide / ui / launch / osgi / EclipseBootLaunchConfiguration.java
1 package org.argeo.slc.ide.ui.launch.osgi;
2
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;
12
13 /** OSGiBoot launch configuration. */
14 public class EclipseBootLaunchConfiguration extends
15 EclipseApplicationLaunchConfiguration {
16 public final static String ID = SlcIdeUiPlugin.ID + ".EclipseBootLauncher";
17
18 @Override
19 public void launch(ILaunchConfiguration configuration, String mode,
20 ILaunch launch, IProgressMonitor monitor) throws CoreException {
21 super.launch(configuration, mode, launch, monitor);
22
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, ""));
29
30 // Refresh resources before launching
31 final IFile propertiesFile = (IFile) configuration.getMappedResources()[0];
32 propertiesFile.getParent().refreshLocal(IResource.DEPTH_INFINITE,
33 monitor);
34 }
35
36 @Override
37 protected void preLaunchCheck(ILaunchConfiguration configuration,
38 ILaunch launch, IProgressMonitor monitor) throws CoreException {
39 ILaunchConfigurationWorkingCopy wc = configuration.getWorkingCopy();
40 OsgiLaunchHelper.updateLaunchConfiguration(wc, true);
41 wc.doSave();
42 super.preLaunchCheck(configuration, launch, monitor);
43
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!
47
48 // for(Object bundleId:fAllBundles.keySet()){
49 // System.out.println(bundleId+"="+fAllBundles.get(bundleId));
50 // }
51 }
52
53 }