Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 49557

Summary: [JUnit] PDE JUnit is using internal RemoteTestRunner
Product: [Eclipse Project] JDT Reporter: Wassim Melhem <wassim.melhem>
Component: UIAssignee: Markus Keller <markus.kell.r>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: benno.baumgartner, martinae, ryanman
Version: 3.2Flags: markus.kell.r: review+
Target Milestone: 3.4 RC1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch none

Description Wassim Melhem CLA 2004-01-05 23:12:45 EST
PDE got a friendly reminder from the API police that we are using the 
following internal classes from JDT JUnit:

org.eclipse.jdt.internal.junit.runner.RemoteTestRunner
org.eclipse.jdt.internal.junit.launcher.JUnitBaseLaunchConfiguration
org.eclipse.jdt.internal.junit.launcher.JUnitLaunchShortcut
org.eclipse.jdt.internal.junit.launcher.JUnitMainTab

We subclass the first three classes and use the fourth one as-is.
Please make them API, as the need for them is not going away.
Comment 1 Wassim Melhem CLA 2004-04-21 13:08:31 EDT
Erich, is this one going to happen in 3.0?
Comment 2 Erich Gamma CLA 2004-04-21 13:37:04 EDT
no the benefit is small and this would just cause another ripple and we want 
to stop the ripples now.
Comment 3 Erich Gamma CLA 2006-05-24 05:48:27 EDT
Moving back to the JDT/UI inbox
Comment 4 Markus Keller CLA 2006-09-15 12:45:59 EDT
Parts of this has already been done in HEAD, but we need to clean up JUnitBaseLaunchConfiguration (and it's PDE-subclass) first to continue:
- decide what attributes should really be visible/changeable for subclasses
- maybe use a separate class to gather all the info that's currently in createVMRunner's arguments
- rename to *Delegate; the current name is very confusing
Comment 5 Markus Keller CLA 2007-04-17 13:37:05 EDT
All internal dependencies except for RemoteTestRunner have been removed.
Moving to 3.4 to see if or when we want to resolve this.
Comment 6 Wassim Melhem CLA 2007-04-17 23:03:43 EDT
Let's hope it's a question of when/how, not if.

The number of discouraged accesses in the SDK has to go down (ultimately to 0) at some point.
Comment 7 Markus Keller CLA 2007-04-18 06:47:12 EDT
I agree. We just have to make sure that the new API does not expose the internal protocol between the host and the target VM
Comment 8 Martin Aeschlimann CLA 2008-05-02 10:28:24 EDT
not for 3.4.
Comment 9 Wassim Melhem CLA 2008-05-02 10:39:06 EDT
Since we want to be API-clean, we have no choice but to remove JUnit plug-in testing from the SDK and have it as an optional download on the PDE page.  How do you like that?
Comment 10 Martin Aeschlimann CLA 2008-05-02 11:44:47 EDT
Created attachment 98455 [details]
patch

This patch will solve the horrible dilemma we're in.
Comment 11 Wassim Melhem CLA 2008-05-02 12:29:00 EDT
Martin, ideally friends should not be crossing feature boundaries.  I don't think PDE should get a special treatment from PDE.

I would prefer to keep the bug open.  It is actually kind of fun to bug you every few months :)
Comment 12 Martin Aeschlimann CLA 2008-05-09 05:23:38 EDT
Markus, can you review the patch in comment 10?
Comment 13 Markus Keller CLA 2008-05-09 10:50:08 EDT
+1. The patch solves the horrible dilemma.

However, this does not solve all friendship problems between jdt.junit and pde.ui:
Bug 216946 has recently added an 'unfriendly' access in org.eclipse.pde.ui.launcher.JUnitLaunchConfigurationDelegate .
Comment 14 Markus Keller CLA 2008-05-13 10:42:42 EDT
Released patch to HEAD.
The other problem from comment 13 could eventually be handled in another bug.
Comment 15 Benno Baumgartner CLA 2008-05-19 05:46:23 EDT
verifying...
Comment 16 Benno Baumgartner CLA 2008-05-19 05:49:36 EDT
verified that we have a new friend in I20080516-1333