Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-debug-dev] External tool launch leaves lifeless entry in Debug view

Hello folks,

here is something strange I observe: 

I created an extension to the
org.eclipse.debug.core.launchConfigurationTypes point 

====snip=====
   <extension
         id="de.siemens.aud.rtp.ftpbeamer.lauchconfigtypes"
         name="Launching configuration types"
         point="org.eclipse.debug.core.launchConfigurationTypes">
      <launchConfigurationType
 
delegate="de.siemens.aud.rtp.ftpbeamer.FTPBeamerLaunchConfigurationDeleg
ate"
            category="org.eclipse.ui.externaltools"
            name="FTP Beamer"
            modes="debug,run"
            id="de.siemens.aud.rtp.ftpbeamer.launchConfigurationType"/>
   </extension>
====snap=====

with my own implementation for the launch configuration delegate:

====snip=====
public class FTPBeamerLaunchConfigurationDelegate extends
LaunchConfigurationDelegate
{
	
	public FTPBeamerLaunchConfigurationDelegate()
	{
		super();
	}
	public void launch(ILaunchConfiguration configuration, String
mode,
			ILaunch launch, IProgressMonitor monitor) throws
CoreException {
		// do something extremely useful
	}
}
====snap=====

I often start this as an external tool when my workbench is in the Debug
_perspective_, so the Debug _view_ is visible.
Each time when I launch the external tool I get an entry (in my case:
"config[FTP Beamer]") in the Debug view. My code does something
extremely useful (for me) but does not start any other threads or
processes. It therefore does not touch the launch parameter that is
passed to the launch() method.
Now there are runs which are successful and launch() return normally and
other runs which fail and where launch() throws an Exception.

If the run fails and an exception is thrown I get the usual messagebox
and the "config[FTP Beamer]" entry is removed from the Debug view. This
should be so.

But if the run is successful and launch() returns normally the
"config[FTP Beamer]" entry remains in the Debug view. This is my
problem.
For every successful run another entry remains in the Debug view. And
there is no way to get rid of them (except restarting the workbench)
since the "Remove all terminated launches" button is grayed, along with
the "Resume", "Pause" and "Terminate" buttons. I only can (via the
context menu) relaunch or edit the launch; this works normally.

I tried to call launch.terminate() at the end of my code to make sure
that the launch is considered terminated, but of course the call does
not really do anything since the launches subprocesses list is empty.

So can anybody help me understand what is going on? And how I can avoid
all those lifeless launch entries?

Thanks,


Norbert Ploett



Back to the top