Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: AW: [platform-debug-dev] External tool launch leaves lifeless entry inDebug view

There's no automatic removal from the debug view. You simply need to 
de-register the launch from the ILaunchManager. You should be able to do 
this from your launch delegate, if there is no reason for the launch to be 
shown in the debug view.

Darin




"Ploett Norbert" <norbert.ploett@xxxxxxxxxxx> 
Sent by: platform-debug-dev-bounces@xxxxxxxxxxx
04/28/2005 01:08 AM
Please respond to
"Eclipse Platform Debug component developers list."


To
"Eclipse Platform Debug component developers list." 
<platform-debug-dev@xxxxxxxxxxx>
cc

Subject
AW: [platform-debug-dev] External tool launch leaves lifeless entry 
inDebug view






Darin,

this was a very valuable hint. Now I created a dummy process class which 
will not really start anything but implements all the methods of the 
Iprocess interface. Especially, the isTerminated() method always returns 
true.
And - bingo - the Debug view displays my process name and return code etc. 
and - most important of all - the entry can now be removed from the 
window.

I suppose that this is the normal default behaviour for an external tool 
launch? Do you know of a way to make the launch entry disappear 
automatically from the Debug view?


Thanks,

Norbert


-----Ursprüngliche Nachricht-----
Von: platform-debug-dev-bounces@xxxxxxxxxxx 
[mailto:platform-debug-dev-bounces@xxxxxxxxxxx] Im Auftrag von Darin 
Wright
Gesendet: Mittwoch, 27. April 2005 15:18
An: Eclipse Platform Debug component developers list.
Betreff: Re: [platform-debug-dev] External tool launch leaves lifeless 
entry inDebug view

An ILaunch object is simply a container of processes and debug targets. A 
launch object is not intended to remain empty (unless an exception is 
thrown during the launch process). The platform assumes you will add 
targets and/or processes to your launch object during the launch, and will 

only be considered terminated when all of the contained targets/processes 
are terminated.

Darin




"Ploett Norbert" <norbert.ploett@xxxxxxxxxxx> 
Sent by: platform-debug-dev-bounces@xxxxxxxxxxx
04/27/2005 05:35 AM
Please respond to
"Eclipse Platform Debug component developers list."


To
<platform-debug-dev@xxxxxxxxxxx>
cc

Subject
[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

_______________________________________________
platform-debug-dev mailing list
platform-debug-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-debug-dev


_______________________________________________
platform-debug-dev mailing list
platform-debug-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-debug-dev
_______________________________________________
platform-debug-dev mailing list
platform-debug-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-debug-dev




Back to the top