Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 451902 - Add org.eclipse.jdt.apt.core plugin to General > Tracing preference page
Summary: Add org.eclipse.jdt.apt.core plugin to General > Tracing preference page
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.5   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 4.5 M4   Edit
Assignee: Szymon Ptaszkiewicz CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 451901
  Show dependency tree
 
Reported: 2014-11-17 08:58 EST by Szymon Ptaszkiewicz CLA
Modified: 2014-12-10 04:47 EST (History)
4 users (show)

See Also:
jarthana: review+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Szymon Ptaszkiewicz CLA 2014-11-17 08:58:27 EST
If a plugin provides .options file, it is possible to enable tracing for this plugin via General > Tracing preference page. This bug covers adding the org.eclipse.jdt.apt.core plugin to this preference page to make it easier to debug problems in runtime without restarting Eclipse.
Comment 1 Szymon Ptaszkiewicz CLA 2014-11-17 10:43:20 EST
Gerrit review: https://git.eclipse.org/r/#/c/36576/

It turned out that DEBUG_COMPILATION_ENV was initialized correctly so I fixed that in this patch. I think it would be good to adjust the behavior of debug flags so that disabling the general flag (plugin_id/debug) disables all flags (like it is done in other bundles including org.eclipse.jdt.core) but this can be done in a separate bug.
Comment 2 Szymon Ptaszkiewicz CLA 2014-11-17 10:56:02 EST
(In reply to Szymon Ptaszkiewicz from comment #1)
> Gerrit review: https://git.eclipse.org/r/#/c/36576/
> 
> It turned out that DEBUG_COMPILATION_ENV was initialized correctly so I
> fixed that in this patch.

Should be: ... was *NOT* initialized correctly
Comment 3 Jay Arthanareeswaran CLA 2014-11-28 06:19:24 EST
Patch is released in master:

http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=7c614d1e063fcf9f7927d45e5d481818530396ac

Thanks for the fix, Szymon!
Comment 4 Dani Megert CLA 2014-12-02 10:12:48 EST
(In reply to Szymon Ptaszkiewicz from comment #1)
> Gerrit review: https://git.eclipse.org/r/#/c/36576/
> 
> I think it would be good to adjust the behavior of
> debug flags so that disabling the general flag (plugin_id/debug) disables
> all flags (like it is done in other bundles including org.eclipse.jdt.core)
> but this can be done in a separate bug.

No, see bug 452134 comment 3.
Comment 5 Szymon Ptaszkiewicz CLA 2014-12-02 11:10:30 EST
(In reply to Dani Megert from comment #4)
> (In reply to Szymon Ptaszkiewicz from comment #1)
> > Gerrit review: https://git.eclipse.org/r/#/c/36576/
> > 
> > I think it would be good to adjust the behavior of
> > debug flags so that disabling the general flag (plugin_id/debug) disables
> > all flags (like it is done in other bundles including org.eclipse.jdt.core)
> > but this can be done in a separate bug.
> 
> No, see bug 452134 comment 3.

See bug 453527.
Comment 6 Jay Arthanareeswaran CLA 2014-12-05 02:34:32 EST
(In reply to Dani Megert from comment #4)
> (In reply to Szymon Ptaszkiewicz from comment #1)
> > Gerrit review: https://git.eclipse.org/r/#/c/36576/
> > 
> > I think it would be good to adjust the behavior of
> > debug flags so that disabling the general flag (plugin_id/debug) disables
> > all flags (like it is done in other bundles including org.eclipse.jdt.core)
> > but this can be done in a separate bug.
> 
> No, see bug 452134 comment 3.

In terms of functionality and usability, I like having something like a master switch, but I do agree that we don't wan to trouble someone who is banking on the current behavior. I think we should also remove relevant parts from fix for bug 451540.
Comment 7 Szymon Ptaszkiewicz CLA 2014-12-05 05:31:57 EST
(In reply to Jayaprakash Arthanareeswaran from comment #6)
> (In reply to Dani Megert from comment #4)
> > (In reply to Szymon Ptaszkiewicz from comment #1)
> > > Gerrit review: https://git.eclipse.org/r/#/c/36576/
> > > 
> > > I think it would be good to adjust the behavior of
> > > debug flags so that disabling the general flag (plugin_id/debug) disables
> > > all flags (like it is done in other bundles including org.eclipse.jdt.core)
> > > but this can be done in a separate bug.
> > 
> > No, see bug 452134 comment 3.
> 
> In terms of functionality and usability, I like having something like a
> master switch, but I do agree that we don't wan to trouble someone who is
> banking on the current behavior. I think we should also remove relevant
> parts from fix for bug 451540.

The fix for bug 451540 is good because master switch was already there. What Dani wants is to keep it the way it used to work - if a plugin had a master switch, it should be there, if it didn't have a master switch, we should not introduce one (although I also agree it would be better to add it for 1) functionality and usability as you mentioned, 2) consistency with other plugins in the same repo).
Comment 8 Szymon Ptaszkiewicz CLA 2014-12-05 07:52:52 EST
Finally, I found official documentation which tells about the master switch:

http://help.eclipse.org/luna/index.jsp?topic=%2Forg.eclipse.pde.doc.user%2Fguide%2Ftools%2Flaunchers%2Ftracing.htm

Based on that documentation, one could say that if the master switch exists and is set to false, then other debug options should be inactive (set to false). Otherwise, the master switch does not work like the master switch.

Also this wiki shows such examples:

https://wiki.eclipse.org/FAQ_How_do_I_use_the_platform_debug_tracing_facility
Comment 9 Szymon Ptaszkiewicz CLA 2014-12-05 07:55:17 EST
(In reply to Szymon Ptaszkiewicz from comment #8)
> Also this wiki shows such examples:
> 
> https://wiki.eclipse.org/FAQ_How_do_I_use_the_platform_debug_tracing_facility

Nice, the wiki was updated by Dani and the examples were removed :)
Comment 10 Dani Megert CLA 2014-12-09 15:36:25 EST
(In reply to Szymon Ptaszkiewicz from comment #8)
> Finally, I found official documentation which tells about the master switch:

It's just doc. Doc is not official. APIs are official. And to proof my words: the example with org.eclipse.ui.ide shows my POV: the code in that bundle actually does not use debug as the master switch. Also, the UI that this page describes does not disable the sub-preferences, i.e. does not treat debug as master switch.


(In reply to Szymon Ptaszkiewicz from comment #9)
> (In reply to Szymon Ptaszkiewicz from comment #8)
> > Also this wiki shows such examples:
> > 
> > https://wiki.eclipse.org/FAQ_How_do_I_use_the_platform_debug_tracing_facility
> 
> Nice, the wiki was updated by Dani and the examples were removed :)

It's on my list to add the possibility of using debug as master switch back (as one of the two possible approaches).
Comment 11 shankha banerjee CLA 2014-12-10 04:47:50 EST
Verified for 4.5 M4 using with build I20141209-2000.