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

Bug 317676

Summary: Provide opt-in mechanism for JSDT debug GUI
Product: [WebTools] JSDT Reporter: Jacek Pospychala <jacek.pospychala>
Component: DebugAssignee: Chris Jaun <cmjaun>
Status: RESOLVED FIXED QA Contact: Simon Kaegi <simon_kaegi>
Severity: normal    
Priority: P3 CC: cmjaun, Michael_Rennie, pwebster, thatnitind
Version: 3.2Flags: thatnitind: review+
Michael_Rennie: review+
Target Milestone: 3.2.4   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
fix
none
proposed fix
none
Patch to remove activity none

Description Jacek Pospychala CLA 2010-06-23 06:56:41 EDT
Our product is using JSDT together with ATF, to provide both rich JS editing support and Mozilla-based debugging. Unfortunately now that JSDT has it's own debugger, lots of GUI elements related to JavaScript debugging are duplicated.

While ATF is currently not yet able to adopt JSDT debugging APIs, nor we cannot trade ATF debugger for JSDT debugger, I'm looking for temporary solution to hide JSDT debugger from user sight.

Ideal solution would be one of:
a) finer-grained features, to separate debugger from editing
b) separate Capabilities category for JSDT debugger
Comment 1 Nitin Dahyabhai CLA 2010-06-23 07:31:40 EDT
How does ATF's debugging support handle itself in this situation?  I imagine we'd just follow your lead on that.  And doesn't most of the ATF UI still refer to Mozilla, i.e. in the perspective name, debug launch shortcut, and launch configurations?  The Variables and Debug views would adhere to the correct process, wouldn't it?
Comment 2 Jacek Pospychala CLA 2010-06-23 08:19:46 EDT
Nobody ever requested ATF to hide it's debugging features, so there's no way to have ATF without it's debugging. We've been recently reducing "Mozilla" icons and name use because it's implementation detail (quite like "Rhino" in JSDT) and it doesn't need to be so prominent as it was.

I like the capabilities idea, so I'd try to cook up a patch in that direction, if you don't object :-)
Comment 3 Michael Rennie CLA 2010-06-28 10:08:09 EDT
(In reply to comment #2)
 
> I like the capabilities idea, so I'd try to cook up a patch in that direction,
> if you don't object :-)

I agree with the use of capabilities. We should follow the Platforms' lead on this and provide a capability for the JSDT debug support to completely remove its presence if the user decides to do so.
Comment 4 Michael Rennie CLA 2010-06-30 10:02:42 EDT
Created attachment 173101 [details]
fix

The patch provides a capability category called "JavaScript Development" with the capability "Debug Support" that can be used to completely disable the JSDT debugger.
Comment 5 Simon Kaegi CLA 2010-06-30 10:21:45 EDT
Looks good.
Comment 6 Jacek Pospychala CLA 2010-06-30 10:26:35 EDT
oh.. is this my birthday today? thanks!
Comment 7 Simon Kaegi CLA 2010-06-30 10:56:58 EDT
(In reply to comment #6)
> oh.. is this my birthday today? thanks!

Oh right. My +1 is conditional on Jacek showing us his unit test work ;)
Comment 8 Michael Rennie CLA 2010-06-30 11:42:33 EDT
applied to HEAD and 3.2.1
Comment 9 Chris Jaun CLA 2011-01-04 16:45:28 EST
I don't think this is the correct solution to this problem...

I'm not an expert on capabilities, but I thought they were intended to be used at a product level, rather than a plugin level.

"First and foremost was our intention that those who are writing plug-ins NOT define activities for them in the plug-in that define their functionality. Any activity definitions provided by the plug-in developer should be isolated so that product developers (those who aggregate plug-ins from various sources) are able to totally own the capabilities for their product." - from article linked at top of this page http://wiki.eclipse.org/Galileo_Capabilities 

I bring this up because I have run into the same problem as Jacek and want to hide the UI for JSDT debug in an adopting product. Generally this has been done with a product level capability, but I am not able to do that now due to a conflict with the JavaScript Development capability.

If anything, defining a JavaScript development capability down in the jsdt.debug plugins doesn't make sense to me.

I am opening this bug to suggest removing the capability from the JSDT plugins. Thoughts? Comments?
Comment 10 Michael Rennie CLA 2011-01-06 12:42:45 EST
(In reply to comment #9)
> I don't think this is the correct solution to this problem...
> 
> I'm not an expert on capabilities, but I thought they were intended to be used
> at a product level, rather than a plugin level.
> 
> "First and foremost was our intention that those who are writing plug-ins NOT
> define activities for them in the plug-in that define their functionality. Any
> activity definitions provided by the plug-in developer should be isolated so
> that product developers (those who aggregate plug-ins from various sources) are
> able to totally own the capabilities for their product." - from article linked
> at top of this page http://wiki.eclipse.org/Galileo_Capabilities 
> 
> I bring this up because I have run into the same problem as Jacek and want to
> hide the UI for JSDT debug in an adopting product. Generally this has been done
> with a product level capability, but I am not able to do that now due to a
> conflict with the JavaScript Development capability.
> 
> If anything, defining a JavaScript development capability down in the
> jsdt.debug plugins doesn't make sense to me.
> 
> I am opening this bug to suggest removing the capability from the JSDT plugins.
> Thoughts? Comments?

I have no problem with pushing the capability definition up to JSDT proper.
Comment 11 Paul Webster CLA 2011-02-03 14:41:00 EST
It seems that a project can provide their own capabilities (although suggested it be in an uncategorized feature that doesn't have to be consumed).  Is that what you guys read in bug 299344 ?

PW
Comment 12 Michael Rennie CLA 2011-02-17 14:36:02 EST
Created attachment 189219 [details]
proposed fix

Here is a proposed fix that leaves the activity binding for JavaScript debugging and removes the category and category bindings, that way it is entirely up to consuming products to provide a category / binding.
Comment 13 Nitin Dahyabhai CLA 2011-02-18 16:30:31 EST
Adding Chris for review; I'll go with his recommendation.
Comment 14 Chris Jaun CLA 2011-02-21 09:32:20 EST
I am still of the opinion that the activity bindings should be removed completely from the JSDT plugins, as I still don't have full control from my product plugin of what is enabled.
Comment 15 Michael Rennie CLA 2011-02-22 09:58:02 EST
(In reply to comment #14)
> I am still of the opinion that the activity bindings should be removed
> completely from the JSDT plugins, as I still don't have full control from my
> product plugin of what is enabled.

That is fine with me, whatever you think will help the most.
Comment 16 Chris Jaun CLA 2011-03-15 09:50:09 EDT
Created attachment 191212 [details]
Patch to remove activity
Comment 17 Chris Jaun CLA 2011-03-15 09:50:36 EDT
I have submitted a patch that completely removes the activity binding.
Comment 18 Michael Rennie CLA 2011-03-15 10:51:27 EDT
can you also make a patch for HEAD?
Comment 19 Michael Rennie CLA 2011-03-15 10:58:04 EDT
hmm, the patch for 3.2.4 does not apply to 3.2.4, there are unresolved segments. Can you re-create the patch Chris?
Comment 20 Chris Jaun CLA 2011-03-23 15:17:30 EDT
Fix checked into 3.2.4. and HEAD.
Comment 21 Michael Rennie CLA 2011-03-23 15:53:12 EDT
The patch missed removing the unused NLS strings in the bundle.properties file for the activity and category name / description. I committed these changes as well.
Comment 22 Nitin Dahyabhai CLA 2011-03-23 18:27:16 EDT
(In reply to comment #21)
Thanks, Michael.