Bug 137057 - [launching] Allow user to resolve launcher to user for config/mode when > 1
Summary: [launching] Allow user to resolve launcher to user for config/mode when > 1
Status: CLOSED DUPLICATE of bug 157059
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.3   Edit
Assignee: Michael Rennie CLA
QA Contact:
URL:
Whiteboard:
Keywords: greatbug
: 140388 (view as bug list)
Depends on: 133733
Blocks:
  Show dependency tree
 
Reported: 2006-04-17 15:21 EDT by Marius Slavescu CLA
Modified: 2009-06-30 10:00 EDT (History)
6 users (show)

See Also:


Attachments
first run (95.79 KB, patch)
2006-07-13 10:50 EDT, Michael Rennie CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marius Slavescu CLA 2006-04-17 15:21:45 EDT
I installed the latest EAP YourKit from http://www.yourkit.com/eap/index.jsp and I found that after I installed the YourKit Eclipse integration plugin the TPTP profiling function is no more called from the launch configuration, however the TPTP "Monitor" tab shows up and you can set it's options.

Althogh "YourKit Java Profiling" tab (see http://www.yourkit.com/features/eclipse/index.jsp) doesn't show up in the launch configuration, YourKit profiling agent is invoked instead of the TPTP one.

There might be some limitations in the way the Profiling launch configuration is designed/exposed, and the load order of extension points might create this behavior.
Comment 1 amehrega CLA 2006-04-17 16:26:21 EDT
This is caused because YourKit and TPTP share the same launch mode that is contributed by org.eclipse.debug.core (i.e. Profile mode).

YourKit happens to overwrite the launch delegates that TPTP contributes.  There is a conflict between the two projects and integration is not possible (and was never required).
Comment 2 Eugene Chan CLA 2006-04-17 16:30:02 EDT
Marius, does it happen to all launch configurations? or only those that comes with Eclipse platform? how about External Java Application which is from TPTP?
I suspect YourKit contributes PROFILE mode delegates to all launch configuration types. Can you please verify? and If it is, then it may up to which profile mode delegate get loaded first.
Comment 3 Marius Slavescu CLA 2006-04-17 16:36:42 EDT
(In reply to comment #1)
> is a conflict between the two projects and integration is not possible (and was
> never required).
> 

I'm not talking about integration with YourKit, I'm just trying to see how we can get consistent behavior when both TPTP and YourKit integration plugin are installed.

This can happen with any other profiler. Please follow up with the Eclipse debug team, we might be able to get a solution in 3.2.
Comment 4 Marius Slavescu CLA 2006-04-17 16:39:53 EDT
(In reply to comment #2)
> Marius, does it happen to all launch configurations? or only those that comes
> with Eclipse platform? how about External Java Application which is from TPTP?
> I suspect YourKit contributes PROFILE mode delegates to all launch
> configuration types. Can you please verify? and If it is, then it may up to
> which profile mode delegate get loaded first.
> 

I tried only Profile Java application, but I suspect the same happens for all the other modes except the TPTP special ones.
Comment 5 amehrega CLA 2006-04-17 19:05:02 EDT
I don't understand how this is a major defect???

As I explained before there is only one mode and there are multiple contributors (TPTP and YourKit).
There is a different extension point for tab group contribution and there is a different extension point for launch delegates.
The eclipse platform happens to pick up the TPTP extension for the tab groups and YourKit's extension for the launch delegate.

If anything, this is more like a feature than a defect.  You can have a feature opened against the debug team but this is a limitation that they are already trying to address with the new launch configuration design they have planned.

Changing target to future and severity to normal.
Comment 6 Valentina Popescu CLA 2006-04-17 21:43:37 EDT
Ali, this is a platform problem. There is a limitation in the way the profiling contribution has been designed so that only one profiler can be contributed for a launch configuration.

Instead of keeping this in our bugzilla I would assign it to the platform component. There is nothing we can do about it
Comment 7 Marius Slavescu CLA 2006-04-17 23:03:23 EDT
I would keep this defect at least to add a readme or help entry to explain this behavior in 4.2.

This is important to be done for Calisto release because TPTP profiler will be always there/installed, but sometimes might not work (like in this case).

I still think this is a major problem for TPTP (even if we cannot fix it in 4.2), also I think we should be the first one to drive better support for profilers in this area (launch configurations).
Comment 8 Eugene Chan CLA 2006-05-05 11:58:05 EDT
*** Bug 140388 has been marked as a duplicate of this bug. ***
Comment 9 Michael Valenta CLA 2006-05-05 12:11:58 EDT
Is there a workaround for this problem? Darin, are you aware of this issue? It seems like a stop ship to me (i.e. if TPTP cannot coexist witjh other profiles, this is a serious problem).
Comment 10 Darin Wright CLA 2006-05-05 12:25:18 EDT
This is a known limitation in the platform. We only support one launcher per mode per configuration type. If there are multiple contributers to the extension point, one wins, depending on the order contributed.
Comment 11 Marius Slavescu CLA 2006-05-05 12:39:39 EDT
The problem that I've seen was that TPTP won on the UI part (Monitor tab showed up) and YourKit won on  the runtime side (YourKit profiling agent was invoked).
Comment 12 amehrega CLA 2006-05-05 13:01:19 EDT
This was discussed during TPTP's AG call on May 5th, 2006 and the general consensus was to mark the defect as an enhancement.  This will track the work required to make use of the new design of the launch configuration once completed by the debug team.

A readme entry will not be useful from a user's perspective because of the technical details required to describe the problem.
Comment 13 Michael Valenta CLA 2006-05-05 13:41:42 EDT
What is the bug number of the enhancement request against Debug to support multiple launch configurations of the same type? The bugs should be linked using the "depends on" field. Also, I assume we will not be able to fix this for Callisto. If this is true, it would be good if the workarounds were documented somewhere (i.e. is it enough to disable TPTP to get YourKit to work or does the user need to start with a fresh install of Callisto that doesn't include TPTP). Ideally, it would also be good if the workaround for getting TPTP to work was known as well (i.e. is it enough to delete the YourKit plugin or is other action required). Perhaps an FAQ would be an appropriate place for this type of information.
Comment 14 Vladimir Kondratyev CLA 2006-05-30 03:35:18 EDT
Perhaps, all "contributors" to PROFILE mode should be shown? And "Profile" action will ask user which delegate ("contributor") to use to run the configuration?

Regards,
Vladimir Kondratyev
YourKit, LLC
http://www.yourkit.com
"Don't get lost in data, get information!"
Comment 15 Darin Wright CLA 2006-05-30 09:23:12 EDT
This bug should be moved to the debug platform. It does not rely directly on bug 133733 (that bug is enhancement request to do away with explicit mutually exclusive launch modes in place of launching with 'modifiers' such as debug and profile). The platform needs to provide a resolution mechanism when there are two (or more) plug-ins contributing a launcher for the same config type and mode.
Comment 16 Michael Rennie CLA 2006-07-13 10:50:01 EDT
Created attachment 46244 [details]
first run

This is a first run at handling more than one contributed launch delegate for the same mode. This patch is not golden but is a good place to start.

Patch includes:
1. new methods added to the launch manager to handle preferred launch delegates and peresist choices of delegates
2. a new preference page which allows users to select a preferred launch delegate from a listing of conflicting delegates
3. new addition to launchDelegate extension point to provide a human readable name for a delegate
4. new addition to LaunchConfigurationTabGroups extension point to related a tab group to a launch delegate id
5. a fast link in the LCD to change preferred delegates

There are some issues encountered, such as:
1. if a contributor does not add in the name for a delegate, the user is presented with the string representation of it's id, e.g. org.eclipse.jdt.debug.LaunchDelegate
2. if a contributor does not provide a delegate id in the tab group extension, there is no way to relate the UI to the delegate, so behaviour is same as before
3. on startup when the launch manager tries to load preferred delegates and there are none it takes a best guess at finding 'defaults'
4. the extra processing slows down the opening of the LCD for the first time after workbench launch
Comment 17 Michael Rennie CLA 2006-10-26 17:35:13 EDT
this problem has been addressed in bug 157159 along with many other changes to the way contributors can make additions to the launching UI.

*** This bug has been marked as a duplicate of 157059 ***
Comment 18 Paul Slauenwhite CLA 2009-06-30 09:35:40 EDT
As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this originator of this enhancement/defect has an inactive Bugzilla account and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open.
Comment 19 Paul Slauenwhite CLA 2009-06-30 10:00:05 EDT
This enhancement/defect was mistaken closed as part of the TPTP 4.6 Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes) since the originator of this enhancement/defect has an inactive Bugzilla account.  If this enhancement/defect is still unresolved and reproducible, please re-open.