Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 250340 - [API] Create template method in JUnitLaunchConfigurationDelegate
Summary: [API] Create template method in JUnitLaunchConfigurationDelegate
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: All All
: P3 trivial (vote)
Target Milestone: 3.5 M3   Edit
Assignee: Chris Aniszczyk CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-09 16:10 EDT by Ketan Padegaonkar CLA
Modified: 2008-10-14 16:59 EDT (History)
2 users (show)

See Also:


Attachments
the said patch (3.51 KB, patch)
2008-10-09 16:11 EDT, Ketan Padegaonkar CLA
caniszczyk: iplog+
Details | Diff
org.eclipse.pde.ui.patch (4.02 KB, patch)
2008-10-14 16:24 EDT, Chris Aniszczyk CLA
no flags Details | Diff
mylyn/context/zip (1.13 KB, application/octet-stream)
2008-10-14 16:24 EDT, Chris Aniszczyk CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ketan Padegaonkar CLA 2008-10-09 16:10:08 EDT
The JUnitLaunchConfigurationDelegate#collectExecutionArguments() figures out the application to be launched by introspecting and applying a set of heuristics.

SWTBot needs that tests run in a non-UI thread, which is why it needs to launch another application (internal to SWTBot) and point that application to the application that the user selects.

In order to do this the application in the case of SWTBot is always hardcoded to the application ID of swtbottestapplication. This patch extracts the piece of code that determines the application id, into a protected method so that clients can override it to provide another application id.

Patch follows.
Comment 1 Ketan Padegaonkar CLA 2008-10-09 16:11:46 EDT
Created attachment 114715 [details]
the said patch
Comment 2 Chris Aniszczyk CLA 2008-10-14 16:24:04 EDT
Created attachment 115081 [details]
org.eclipse.pde.ui.patch

Here is an updated patch.

Ketan, I assume you have something like an "SWTBot" launch configuration that reuses the PDE JUnit launch configuration?
Comment 3 Chris Aniszczyk CLA 2008-10-14 16:24:08 EDT
Created attachment 115082 [details]
mylyn/context/zip
Comment 4 Ketan Padegaonkar CLA 2008-10-14 16:52:36 EDT
Looks good. SWTBot launch configuration would be overriding the getApplication to stick in the swtbot application ID instead.

Thanks!
Comment 5 Chris Aniszczyk CLA 2008-10-14 16:58:22 EDT
done.

> 20091014

Thanks for your contribution Ketan.