X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;ds=sidebyside;f=ide%2Fplugins%2Forg.argeo.slc.ide.osgi.ui%2Fsrc%2Forg%2Fargeo%2Fslc%2Fide%2Fui%2Flaunch%2Fosgi%2FOsgiBootEquinoxLaunchConfiguration.java;fp=ide%2Fplugins%2Forg.argeo.slc.ide.osgi.ui%2Fsrc%2Forg%2Fargeo%2Fslc%2Fide%2Fui%2Flaunch%2Fosgi%2FOsgiBootEquinoxLaunchConfiguration.java;h=19cdee12b8b1896f839293499d8fd66f208f9e3b;hb=081d527b65e742dc3e41ce569246d9cf653f7e07;hp=0000000000000000000000000000000000000000;hpb=49f14f0278277e965b3f96cc9b7419e67c584957;p=gpl%2Fargeo-slc.git diff --git a/ide/plugins/org.argeo.slc.ide.osgi.ui/src/org/argeo/slc/ide/ui/launch/osgi/OsgiBootEquinoxLaunchConfiguration.java b/ide/plugins/org.argeo.slc.ide.osgi.ui/src/org/argeo/slc/ide/ui/launch/osgi/OsgiBootEquinoxLaunchConfiguration.java new file mode 100644 index 000000000..19cdee12b --- /dev/null +++ b/ide/plugins/org.argeo.slc.ide.osgi.ui/src/org/argeo/slc/ide/ui/launch/osgi/OsgiBootEquinoxLaunchConfiguration.java @@ -0,0 +1,55 @@ +package org.argeo.slc.ide.ui.launch.osgi; + +import org.argeo.slc.ide.ui.SlcIdeUiPlugin; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.debug.core.ILaunch; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; +import org.eclipse.pde.launching.EquinoxLaunchConfiguration; + +/** OSGiBoot launch configuration. */ +public class OsgiBootEquinoxLaunchConfiguration extends + EquinoxLaunchConfiguration { + public final static String ID = SlcIdeUiPlugin.ID + + ".OsgiBootEquinoxLauncher"; + + @Override + public void launch(ILaunchConfiguration configuration, String mode, + ILaunch launch, IProgressMonitor monitor) throws CoreException { + super.launch(configuration, mode, launch, monitor); + +// System.out.println("targetBundles=" +// + configuration.getAttribute( +// IPDELauncherConstants.TARGET_BUNDLES, "")); +// System.out.println("workspaceBundles=" +// + configuration.getAttribute( +// IPDELauncherConstants.WORKSPACE_BUNDLES, "")); + + // Refresh resources before launching + final IFile propertiesFile = (IFile) configuration.getMappedResources()[0]; + propertiesFile.getParent().refreshLocal(IResource.DEPTH_INFINITE, + monitor); + } + + @Override + protected void preLaunchCheck(ILaunchConfiguration configuration, + ILaunch launch, IProgressMonitor monitor) throws CoreException { + // System.out.println("Launching... " + launch); + ILaunchConfigurationWorkingCopy wc = configuration.getWorkingCopy(); + OsgiLaunchHelper.updateLaunchConfiguration(wc, false); + wc.doSave(); + super.preLaunchCheck(configuration, launch, monitor); + + // Note that if a Java project contains a build.properties it has to + // declare the sources otherwise it will be skipped in the generation of + // the dev.properties file! + + // for(Object bundleId:fAllBundles.keySet()){ + // System.out.println(bundleId+"="+fAllBundles.get(bundleId)); + // } + } + +}