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

Bug 374673

Summary: use <visibleWhen/> for contained components
Product: z_Archived Reporter: Steffen Pingel <steffen.pingel>
Component: MylynAssignee: Steffen Pingel <steffen.pingel>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3    
Version: unspecified   
Target Milestone: 3.8   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on: 374326    
Bug Blocks: 321278, 376368    
Attachments:
Description Flags
mylyn/context/zip none

Description Steffen Pingel CLA 2012-03-19 12:45:21 EDT
Hiding of the active task trim does not work properly on e4 (bug 355059). To properly hide hide trims all contributions to the trim need to be hidden since <visibleWhen/> on the trim toolbar itself has no effect (see bug 201589). Instead of using internals to manipulate control visibility the plugin.xml should specify <visibleWhen/> extensions for all contributions.
Comment 1 Steffen Pingel CLA 2012-03-19 12:46:47 EDT
Proposed change: http://review.mylyn.org/375

Paul Webster writes on bug 355059 comment 29:

> You can ask the property tester to re-evaluate at any time using
> org.eclipse.ui.services.IEvaluationService.requestEvaluation(String)
> 
> The only other thing to be careful about is the property tester has been added
> in your UI plugin.  forcePluginActivation will allow the UI framework to load
> any UI delegates it thinks it needs.
Comment 2 Steffen Pingel CLA 2012-04-23 01:50:23 EDT
I have committed the change. I tried using the evaluation service to trigger toggling of visibility on preference change but that didn't work. The workbench updates visibility on shell activation though which seems good enough.
Comment 3 Steffen Pingel CLA 2012-04-23 01:50:26 EDT
Created attachment 214364 [details]
mylyn/context/zip
Comment 4 Sam Davis CLA 2012-06-07 18:25:12 EDT
Steffen, I installed 20120531-0157 and am not able to hide the trim. Changing the preference has no effect.
Comment 5 Sam Davis CLA 2012-06-07 18:27:45 EDT
Also, bootstrapping on master, changing the preference hides the trim but leaves behind an empty toolbar.
Comment 6 Sam Davis CLA 2012-06-07 19:19:14 EDT
(In reply to comment #4)
> Steffen, I installed 20120531-0157 and am not able to hide the trim. Changing
> the preference has no effect.

I guess you can ignore this comment - I somehow have Mylyn 3.7.1 installed. Comment 5 still stands though.
Comment 7 Steffen Pingel CLA 2012-06-10 13:24:23 EDT
(In reply to comment #5)
> Also, bootstrapping on master, changing the preference hides the trim but leaves
> behind an empty toolbar.

I have seen this, too, but couldn't come up with reliable steps to reproduce. Please file a platform bug if you are still experiencing this with RC4.
Comment 8 Sam Davis CLA 2012-06-10 17:34:43 EDT
This is reliably reproducable on 3.7. I have not seen it on 4.x. I posted a comment on bug 201589.