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

Bug 370615

Summary: Support dynamic tracing for e4 workbench
Product: [Eclipse Project] Platform Reporter: Curtis Windatt <curtis.windatt.public>
Component: UIAssignee: Platform UI Triaged <platform-ui-triaged>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, Lars.Vogel, Michael_Rennie, pwebster
Version: 4.2   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard: stalebug
Attachments:
Description Flags
Fix
none
Github pullrequest as a patch none

Description Curtis Windatt CLA 2012-02-03 18:03:39 EST
org.eclipse.e4.ui.workbench and org.eclipse.e4.ui.workbench.swt already use the DebugTrace API from OSGi.  It is therefore simple to add the debug options to the tracing preference page (where they can be toggled on/off at runtime).

I have put both of the bundles under the same trace category, but it is easy to separate them if preferred.
Comment 1 Curtis Windatt CLA 2012-02-03 18:09:39 EST
Created attachment 210531 [details]
Fix

I got an internal exception while trying to push to GitHub using eGit so I'm attaching a patch.  Debugging eGit can wait until next week.
Comment 2 Paul Webster CLA 2012-02-07 08:55:29 EST
We can't have a dependency on org.eclipse.ui as part of the e4 bundles, and org.eclipse.ui.trace depends on o.e.ui.

If it doesn't need any code, you can just include the extension right?

PW
Comment 3 Curtis Windatt CLA 2012-02-07 14:05:04 EST
(In reply to comment #2)
> If it doesn't need any code, you can just include the extension right?
> 
> PW

Yes, that is fine.  The extension could also be moved to another plug-in that can have direct dependencies on ui as well as e4.
Comment 4 Curtis Windatt CLA 2012-02-09 15:21:48 EST
Fix without dependency can be found here:
https://github.com/CWindatt/eclipse.platform.ui/commit/cdd3858d8ba7efa200adf94c19a113f63bd55ae4

No rush to putting this in as the tracing bundle may get changed in the near future for better auto-starting (bug 369916)
Comment 5 Curtis Windatt CLA 2012-02-17 12:17:33 EST
Better fix:
https://github.com/CWindatt/eclipse.platform.ui/commit/22fb85d9bed6bf29a203b4e0a3c8a6bd73138374

Initializes debug trace using a listener to ensure the tracing ui bundle gets started. I commented out a number of debug options that are not used in the bundles and cleaned up the constants.
Comment 6 Curtis Windatt CLA 2012-02-28 15:54:12 EST
Fix is also available at Michael's GitHub fork:
https://github.com/mrennie/eclipse.platform.ui/commit/22fb85d9bed6bf29a203b4e0a3c8a6bd73138374
Comment 7 Lars Vogel CLA 2014-07-02 04:20:30 EDT
(In reply to Curtis Windatt from comment #5)
> Better fix:
> https://github.com/CWindatt/eclipse.platform.ui/commit/
> 22fb85d9bed6bf29a203b4e0a3c8a6bd73138374

Could you convert that into a Gerrit review?
Comment 8 Curtis Windatt CLA 2014-07-10 17:22:26 EDT
Created attachment 244989 [details]
Github pullrequest as a patch

I added my github fork as a remote and created this patch.  I haven't tried applying it to master, which is 1000 commits ahead of the pull request, so good luck :)
Comment 9 Eclipse Genie CLA 2020-02-12 18:03:55 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.