Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 109211 - [api] Require public api to extend Java Launch Configuration UI
Summary: [api] Require public api to extend Java Launch Configuration UI
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.2 M5   Edit
Assignee: Michael Rennie CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-09 17:18 EDT by Srimanth CLA
Modified: 2006-01-25 16:07 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Srimanth CLA 2005-09-09 17:18:38 EDT
Currently the VE project provides a 'Java Bean' launcher which extends the Java
Launch configuration UI to provide customization for Java Beans. This requires
the usage of internal API to create a tab pane etc. It would be great if there
could be some public way of extending the Java launch configuration UI.
Comment 1 Darin Wright CLA 2005-09-23 10:37:38 EDT
What are you extending? I.e. which class(es)?
Comment 2 Richard Kulp CLA 2005-09-23 12:44:05 EDT
We are subclassing or using:

JavaLaunchConfigurationTab - It provides good base function for java launch tabs.

JavaLaunchConfigurationUtil - It provides good utils, such as getMainType or
findType that are very useful for java launch pages.
Comment 3 Brock Janiczak CLA 2005-09-23 18:43:03 EDT
In my case, i don't want to create a new type of launch configuration, just
extend the capabilities of existing ones.  Is that covered by this pr?

I was expecting something like two extension points.  One for registering new
configuration tabs and one for adding some kind of launch configuration
processor.  The launch configuration processor would be asked to generate a list
of program and VM arguments from an ILaunchConfiguration.
Comment 4 Darin Wright CLA 2005-09-26 10:01:38 EDT
Response to comment#3. The extensibility of launch configs is as follows:

* you can contribute a launch delegate for a launch mode of an existing config 
type (for example, a profile launch delegate for the Java application launch 
config)
* you can contribute extra tabs for a specific launch modde (for example, 
extra profiler tabs)

You cannot override the function of an exisiting launcher - you need to 
provide a new launch type. You can subclass our existing java launcher, which 
is API: JavaLaunchDelegate.
Comment 5 Darin Wright CLA 2005-09-26 10:07:44 EDT
Response to comment#2.

* We can't really open the JavaLaunchConfigurationTab without opening up 
IEntriesChangedListener (which is not something we want to commit to 
currently).

* Looking at JavaLaunchConfigurationUtils, I'd like to remove the methods we 
no longer use internally (it turns out, the only method we're using is 
serializeDocument). The rest can be removed, as we no longer use them.
Comment 6 Darin Wright CLA 2005-09-26 10:21:07 EDT
For now, I've removed the unused code and deleted JavaLaunchConfigurationUtil. 
Moved the "serialzieDocument" helper to the LaunchingPlugin.
Comment 7 Richard Kulp CLA 2005-09-26 11:56:06 EDT
I don't care about exposing the entriesChanged method or the
IEntriesChangedListener as public API. They can stay non-API for all I care. The
fact that it handles, via your internal code, and causes an update if the
classpath changes is one of the reasons we wanted to subclass
JavaLaunchConfigurationTab. We would gain that function automatically since
there is no way for us to do it ourselves since it is internal code. The
listener class itself can stay internal.

The others we like are the getContext() method and the intializeJavaProject
method are also what we want API from the class.
Comment 8 Darin Wright CLA 2005-10-24 11:39:10 EDT
Not curretly committed as we are in the process of changing the runtime 
classpath viewer/editor. See bug 34095 and bug 61488.
Comment 9 Darin Wright CLA 2005-11-10 13:44:51 EST
We can make some form of the JavaLaunchConfigurationTab API to expose these 
methods:
* protected IJavaElement getContext()
* protected void initializeJavaProject(IJavaElement javaElement, 
ILaunchConfigurationWorkingCopy config)

We do not intend to expose "IEntriesChangedListener", but will maintain the 
function.

I still need more information regarding requirements from comment#3 (Brock?).
Comment 10 Brock Janiczak CLA 2005-11-10 15:49:18 EST
(In reply to comment #9)
> I still need more information regarding requirements from comment#3 (Brock?).

I was wanting to add extra pages the the Java and JUnit launch configurations
without having to create a whole new launch type.  In my case i wanted to add
one tab for setting assertion properties and another for setting up the JDK
logging properties.  In both of these cases a list of system properties are
being modified.  I can't see participants needing to change anything other than
system properties and program arguments.

This issue was more about creating new 'java like' launches, so perhaps i should
create a new PR?
Comment 11 Darin Wright CLA 2005-11-22 11:07:16 EST
Brock, please enter a new enhancement request for your issue. I believe it is different from the purpose of this request. Thx.
Comment 12 Darin Wright CLA 2005-11-29 16:54:17 EST
Will create API as stated in comment#9
Comment 13 Darin Wright CLA 2006-01-25 15:47:09 EST
Fixed. Added new API class JavaLauncTab. Exposes the following API:

protected IJavaElement getContext()
protected ILaunchConfiguration getCurrentLaunchConfiguration()
public void initializeFrom(ILaunchConfiguration config)
protected void initializeJavaProject(IJavaElement javaElement, ILaunchConfigurationWorkingCopy config)

Does not expose entries changed listener. The listener interface was only used by the classpath tab and deprecated source lookup tab. Since those classes were not previously subclassable, there is no reason to expose the entries changed listener (that and the fact we hope to improve/change classpath editing).
Comment 14 Darin Wright CLA 2006-01-25 15:47:52 EST
Please verify, Mike. (note typo - new class is JavaLaunchTab, added to component.xml).
Comment 15 Michael Rennie CLA 2006-01-25 16:07:23 EST
verified.