Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 53124 - PDE launch configuration types are not extendable for other modes
Summary: PDE launch configuration types are not extendable for other modes
Status: CLOSED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.1 M4   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-25 16:26 EST by Curtis d'Entremont CLA
Modified: 2005-04-25 13:39 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Curtis d'Entremont CLA 2004-02-25 16:26:13 EST
Currently, the constants for the attribute keys are in 
org.eclipse.pde.internal.ui.launcher.ILaunchSettings, which is internal to the 
PDE. We would like to request that these be made public API.

Here's why. The Hyades profiler would like to support profiling the runtime 
workbench, which means launching your launch configurations in "profile" mode. 
In order to do this, our launch configuration delegate needs to be able to read 
your launch configurations.
Comment 1 Curtis d'Entremont CLA 2004-02-25 16:35:22 EST
I'm not sure why, but bugzilla doesn't email anyone if I enter CC's while 
opening the bug (a bug in bugzilla?). Anyway, here's your email.
Comment 2 Wassim Melhem CLA 2004-02-25 16:44:18 EST
What kind of useful information could be retrieved from their values?  Their 
values only make sense for PDE that uses them to determine the arguments with 
which to launch the runtime workbench.
These program argumens are interesting, and can be readily viewed in the Debug 
view.
Unless I'm missing something, it does not make sense to expose the values for 
the keys in question.
Comment 3 Curtis d'Entremont CLA 2004-02-26 10:05:43 EST
In order to launch a VM in profiling mode, we have to pass the VM argument -
XrunpiAgent. This is similar to what the debugger does to launch in debug mode. 
Your workbench launch delegate accepts "debug" mode, and simply asks the 
VMRunner to launch in this mode. The JDT's standard VM runner knows what to do 
with "debug" mode and adds its VM arguments just before launching. 

Unfortunately, we cannot do the same with "profile" mode because the standard 
VM runner is not extensible, and is hardcoded to handle only "run" and "debug" 
modes. Even if it were extensible, your launch delegate does not support 
the "profile" mode.

This leaves our profile mode delegate with two basic options: Either read the 
launch configuration and launch the workbench ourselves, or add our VM arg to 
the launch configuration then delegate in "run" mode to your launch delegate. 
Unfortunately, for internal reasons it doesn't appear that the latter is 
feasible for us. This leaves us with launching the workbench ourselves, which 
is admittedly a bad solution, but the only feasible one I can see at the moment.
Comment 4 Wassim Melhem CLA 2004-02-26 10:16:36 EST
>This leaves us with launching the workbench ourselves, which 
>is admittedly a bad solution, but the only feasible one I can see at the 
>moment.

You will not be able to do anything even if you had access to these 
arguments.  PDE does not just pass them in.  For each key, PDE does a certain 
amount of processing to determine what program argument to add, what file to 
generate, what directories to generate for the runtime workbench, etc...

Are you also planning to use/copy the PDE code that actually processes these 
arguments?
Comment 5 Curtis d'Entremont CLA 2004-02-26 10:30:33 EST
I was just going to ask about this. How opposed would you be to providing 
access to this processing?
Comment 6 Curtis d'Entremont CLA 2004-03-30 11:09:50 EST
We've been experiencing build problems recently relating to internal API 
changes in your launching code.. Currently we are duplicating all of your 
private methods in WorkbenchLaunchConfigurationDelegate and relying on other 
internal classes in order to profile the workbench. Again, I realize this is 
very bad, but unfortunately it's either this or no workbench profiling.

I understand a good solution can't happen quickly, but I think there's a quick 
fix that would improve our build stability, for now; by changing all private 
access in WorkbenchLaunchConfigurationDelegate to protected, allowing us to 
subclass and inherit most of the processing. Would this be possible in the near-
term?
Comment 7 Wassim Melhem CLA 2004-03-31 16:37:32 EST
>We've been experiencing build problems recently relating to internal API 
>changes in your launching code.. 
No such thing as internal API, only public API.  Classes are either designed 
and meant for public consumption or they're not.  In this case, they are not.

>I think there's a quick fix that would improve our build stability, for now; 
>by changing all private access in WorkbenchLaunchConfigurationDelegate to 
>protected,

Making private members/methods protected just to let you subclass internal 
classes is not a solution. It will effectively make all these classes API. We 
want to have the freedom to change our code whenever we want without being 
blamed/held responsible for breaking or compromising the stability of your 
build.

There is no plan to make the launcher code/constants/tabs public API in 3.0.
Comment 8 Valentina Popescu CLA 2004-03-31 16:50:54 EST
Wassim, our intention is to support profiling the runtime workbench and to be 
able to do that, we must read the eclipse runtime configuration.

Since this is a critical usability feature for all products shipping Hyades, 
such as RDJ, we do need a solution soon. 

Comment 9 Wassim Melhem CLA 2004-03-31 16:54:59 EST
Then we need a better explanation/justification for the urgency of this 
request.  So far, all I've heard is that you want to expose to the user values 
of some internal launcher constants that only make sense for PDE anyways, and 
mean nothing to the user.

This alone is not going to cut it at this stage in the game.
Comment 10 Valentina Popescu CLA 2004-03-31 17:02:48 EST
I find Curt's explanation pretty reasonable, this is a copy/paste from the 
defect description :

'The Hyades profiler would like to support profiling the runtime 
workbench, which means launching your launch configurations in "profile" mode. 
In order to do this, our launch configuration delegate needs to be able to read 
your launch configurations.'

I think a face to face discussion would help us get the bigger picture. I'll 
try to book a meeting with you soon, maybe tomorrow or Friday; thanks
Comment 11 Wayne Ho CLA 2004-03-31 17:20:41 EST
As Valentina describes, in the current state it is NOT possible to perform
profiling or runtime analysis for the runtime workbench.

This leaves the unusual situation of providing function to users to perform
runtime analysis/profiling for applications within a workspace and also external
to the workspace (via an attach) but not providing this function for users
developing Eclipse plugins with PDE.

This makes it difficult for developers creating Eclipse plugins to make use of
existing Hyades performance analysis (and 3rd party performance analysis) tools.
Comment 12 Curtis d'Entremont CLA 2004-07-20 18:08:27 EDT
Can you please set a target for this? I'd like to see this as soon as possible 
since it's causing problems for us.
Comment 13 Curtis d'Entremont CLA 2004-07-20 18:16:31 EDT
Switching to a more appropriate summary. I leave the design up to you; we want 
to inherit the processing of the launch configuration attributes in order to 
launch the workbench in a different mode, with additional VM arguments. This is 
really all it boils down to. Right now there is no way to inherit any of this 
PDE functionality other than by using its internals (non-API).
Comment 14 Curtis d'Entremont CLA 2004-09-22 10:18:24 EDT
Any progress on this? Can you please target?
Comment 15 Curtis d'Entremont CLA 2004-10-27 18:11:43 EDT
Let's try this once more..

Any progress on this? Can you please target?
Comment 16 Wassim Melhem CLA 2004-11-16 03:54:53 EST
Fixed to Curtis' liking.
Comment 17 Curtis d'Entremont CLA 2004-11-23 16:38:45 EST
Verified with the latest code in HEAD.
Comment 18 Curtis d'Entremont CLA 2005-04-25 13:39:57 EDT
Closing bugs that were previously verified.