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

Bug 181277

Summary: [JUnit] Providing the ability to profile JUnit and JUnit plug-ins
Product: [Eclipse Project] JDT Reporter: amehrega
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: darin.eclipse, ewchan, martinae
Version: 3.3   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 181273    
Attachments:
Description Flags
Patch none

Description amehrega CLA 2007-04-05 14:41:06 EDT
TPTP requires 2 sets of getter & setter methods in JUnitLaunchConfigurationDelegate to be able to provide the ability to profile JUnit and JUnit plug-in tests.  The details of this have already been discussed with Darin Wright.  I will attach a patch shortly.
Comment 1 amehrega CLA 2007-04-05 14:41:30 EDT
Created attachment 63084 [details]
Patch
Comment 2 Olivier Thomann CLA 2007-04-05 14:44:40 EDT
Moving to JDT/UI
Comment 3 Martin Aeschlimann CLA 2007-04-10 04:07:24 EDT
Can you explain how and when exactly you would use the suggested API? The fields you mention are used to temporarily keep some state while 'launch' is called (to avoid some parameters). Unless you're extending JUnitLaunchConfigurationDelegate, setting the elements or port doesn't help.
But if you're extending, the you can override 'evaluateTests'.
Comment 4 amehrega CLA 2007-04-10 10:18:44 EDT
Hi Martin,

The class is being extended.
The fields are being used in collectExecutionArguments which does use a few private methods.  I would like to avoid any copying of internal APIs (it's bad enough that we're extending the class to expose some of the protected methods as public).

May 7th is the last date that I can have the functionality added back in TPTP.  If you would like to find out more details about how this API is being used then extract platform/org.eclipse.hyades.trace.ui from TPTP's cvs and apply the patch that's been attached to https://bugs.eclipse.org/bugs/show_bug.cgi?id=181273

Thanks.
Comment 5 amehrega CLA 2007-04-10 10:58:10 EDT
I was incorrect about the due date.  The last date that I can add back the functionality is Apr 27/2007.
Comment 6 Martin Aeschlimann CLA 2007-04-10 12:47:15 EDT
Note that we are in API freeze mode since March 23rd and I need to raise this issue to the PMC.

I tried to understand what your code is doing. If I understand correct, you don't want to use the JUnitLaunchDelegate to launch a process, but are using it to just get all the information from the ILanuchConfiguration. 
That's not really what it was designed for. I'm afraid the next change or addition that is done to the launch delegates will break you again.
Comment 7 amehrega CLA 2007-04-10 13:47:00 EDT
I thought API freeze only applies to public API, not internal ones.
There was a mutual agreement for JDT to notify TPTP of any changes to this class that can affect us.
Comment 8 amehrega CLA 2007-04-10 16:16:48 EDT
Darin showed me an alternative way of accomplishing this without the need of the getter/setter methods.  I'm marking the defect as won't fix.

I will re-open https://bugs.eclipse.org/bugs/show_bug.cgi?id=170233 around the July time-frame so that the APIs will be considered to be made public during Eclipse 3.4 planning.

Thanks.
Comment 9 Martin Aeschlimann CLA 2007-04-11 05:02:48 EDT
JUnitLaunchConfigurationDelegate is new API since 3.3. There is no 'internal' API here. I wasn't aware of such a agreement, sorry. When and with who was that discussed?

Comment 10 Darin Wright CLA 2007-04-11 08:51:24 EDT
Martin, when I originally heard about the problem (before a bug report existed), I thought the problem was with internal Java launchers - it turned out to be JUnit and API. I had agreed to make internal methods protected so they could be accessed if needed - but it is not needed anymore.