Bug 478397 - Contribution of module for launch and debug
Summary: Contribution of module for launch and debug
Status: CLOSED FIXED
Alias: None
Product: Ease
Classification: Technology
Component: Modules (show other bugs)
Version: 0.2.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 0.3.0   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-25 05:51 EDT by Jonah Graham CLA
Modified: 2015-10-15 12:53 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonah Graham CLA 2015-09-25 05:51:39 EDT
I am working on my first module, one for doing Launch (and maybe some debug).
Comment 1 Christian Pontesegger CLA 2015-09-25 09:57:50 EDT
Great idea!
In case you need some points to start with, the ease.ui module comes with some helper methods to create and run launch configurations. Now dedicated to EASE, these helpers might be easily reused for a dedicated module.
Comment 2 Eclipse Genie CLA 2015-10-04 11:04:38 EDT
New Gerrit change created: https://git.eclipse.org/r/57359
Comment 3 Eclipse Genie CLA 2015-10-04 11:05:10 EDT
New Gerrit change created: https://git.eclipse.org/r/57360
Comment 4 Jan Gundtofte-Bruun CLA 2015-10-12 04:18:45 EDT
This sounds like it might be *exactly* what I'm after, even including killing the external program when the run/debug session ends. Very nice!
Comment 7 Christian Pontesegger CLA 2015-10-15 03:50:16 EDT
implemented, thanks for the commit!

@Jan:

Kill ing an external Process cannot be done with the launch directly.

Eventually you could use runProcess from the Platform module to issue a kill command...
Comment 8 Jonah Graham CLA 2015-10-15 04:02:57 EDT
(In reply to Christian Pontesegger from comment #7)
> @Jan:
> 
> Kill ing an external Process cannot be done with the launch directly.
> 
> Eventually you could use runProcess from the Platform module to issue a kill
> command...
However if you have launched the program with an External Tools Configuration launch, then you can terminate it. e.g.:

myRunningExternalLaunch = launch("External Launch Configuration Name")
// ... logic ...
myRunningExternalLaunch.terminate()

The example snippet provided in https://git.eclipse.org/c/ease/org.eclipse.ease.scripts.git/tree/JavaScript%20Snippets/Script%20helpers/Add%20to%20script%20locations.js shows an example of terminating a launch, that applies equally to external program launches.