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

Bug 313893

Summary: Confusing debugger capabilities
Product: [Tools] CDT Reporter: Anton Leherbauer <aleherb+eclipse>
Component: cdt-debugAssignee: Ken Ryall <ken.ryall>
Status: RESOLVED FIXED QA Contact: Ken Ryall <ken.ryall>
Severity: major    
Priority: P3 CC: mober.at+eclipse, pawel.1.piech, vivkong
Version: 7.0   
Target Milestone: 7.0   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
the changes ken.ryall: iplog-

Description Anton Leherbauer CLA 2010-05-21 07:09:33 EDT
In the Capabilities preference page I see following debugger related capability categories:

CDT CDI-GDB - GDB Debugging (Legacy)
CDT Debug - C/C++ Development Tools
CDT DSF-GDB - GDB Debugging
CDT-DSF Debug Services Framework
EDC - Eclipse Debugger for C/C++
Standard Debug Commands

1. Every category has exactly one activity below it - one category for all (or 
   maybe two) would reduce the clutter.
2. Capabilities should be defined in the product bundle (org.eclipse.cdt) so 
   that third parties can deploy CDT without introducing unwanted or possibly 
   conflicting capabilities into their product.
3. Most of them are controlled programmatically and only enable a preference 
   page or two, therefore they should not be visible to the user anyway.
4. The "CDT-DSF Debug Services Framework" capability does not enable anything.
Comment 1 Martin Oberhuber CLA 2010-05-21 08:03:36 EDT
I would even claim that these CDT capabilities are a major problem for our product on top of Eclipse / CDT. And that these should be removed NOW, before somebody starts relying on these capabilities existing in a place where they should not be.

Here is the reason why I think this is a major problem: In our product on top of Eclipse, we have created a set of Capabilities that matches our needs, such that we can hide things that we don't want to expose to a user. But since Eclipse Capabilities work such that any one item is ENABLED as soon as ONE activity that matches its pattern enables it, our mechanisms don't work any more: stuff gets enabled by the CDT capabilities, although we want to deliberately hide it.

Long story short, the biggest problem is Toni's point 2: Capabilities must be defined in the context of a PRODUCT, and not in the context of a plugin or component.

I would recommend removing those capability definitions from the code completely and only document on a webpage what can be enabled in order to satisfy the Helios requirement; WTP, for instance, has moved in this 
direction as per bug 306315 comment 13, and
  http://wiki.eclipse.org/WTP_Capabilities_Helios

Or, to define the capabilities in a separate plugin which product builders can safely remove from their product config; like the Eclipse SDK defines its Capabilities in the org.eclipse.sdk bundle which adopters of the plain Platform typically don't use. Or like Mylyn does, as per bug 299344 comment 16. In the context of contributing Capabilities to the EPP packages, also 
  http://wiki.eclipse.org/Helios/Contributing_to_Helios_Build#Contributing_non-categorized_bundles_or_features_to_the_central_repository
may be relevant here.
Comment 2 Ken Ryall CLA 2010-05-21 12:00:48 EDT
Fair enough, I'll go back, look at all these again, and pull them out if I can't satisfy your concerns.
Comment 3 Martin Oberhuber CLA 2010-05-21 12:40:23 EDT
Thanks Ken! My acceptance criterion is simple:

Regardless of structure, any Capability definition must be in some palce that I can safely not use when building my product... those Capability definitions that I need will then be properly merged into my own product / branding bundle.
Comment 4 Ken Ryall CLA 2010-05-26 12:19:15 EDT
All activities have been moved to org.eclipse.cdt. Categories have been removed as they didn't make sense and these didn't need to be user visible anyway.
Comment 5 Ken Ryall CLA 2010-05-26 12:19:35 EDT
Created attachment 170037 [details]
the changes
Comment 6 Martin Oberhuber CLA 2010-05-26 17:57:27 EDT
Interestingly, I cannot see anything related to Capabilities in the plugin.xml of org.eclipse.cdt -- am I missing something?

This is where I am looking:
/cvsroot/tools, org.eclipse.cdt-releng/org.eclipse.cdt

and CVS tags seem to indicate that this is the current version...
Comment 7 Ken Ryall CLA 2010-05-26 18:20:28 EDT
I added them to org.eclipse.cdt/all/org.eclipse.cdt because that's what I had in my workspace. Not sure how this is different than org.eclipse.cdt-releng/org.eclipse.cdt.
Comment 9 Martin Oberhuber CLA 2010-05-27 09:58:11 EDT
Ok, I'm getting the updates now - thanks.
Apparently the pserver shadow copy was lagging on dev.eclipse.org.
Comment 10 Vivian Kong CLA 2010-06-07 10:30:13 EDT
(In reply to comment #4)
> All activities have been moved to org.eclipse.cdt. Categories have been removed
> as they didn't make sense and these didn't need to be user visible anyway.

Hi Ken, so how can users activate the preference pages hidden by capabilities now?  I'm asking from a translation testing point of view.  Thanks
Comment 11 Ken Ryall CLA 2010-06-07 11:25:11 EDT
(In reply to comment #10)
> (In reply to comment #4)
> > All activities have been moved to org.eclipse.cdt. Categories have been removed
> > as they didn't make sense and these didn't need to be user visible anyway.
> 
> Hi Ken, so how can users activate the preference pages hidden by capabilities
> now?  I'm asking from a translation testing point of view.  Thanks

They are activated when they first launch a debug session for DSF-GDB, CDI-GDB, or DSF-EDC.