Bug 562892 - Calling toBeRendered on a view toolbar breaks UI
Summary: Calling toBeRendered on a view toolbar breaks UI
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.14   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.17 M1   Edit
Assignee: Rolf Theunissen CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 550268 563750 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-05-06 11:27 EDT by Lars Vogel CLA
Modified: 2021-04-06 08:09 EDT (History)
4 users (show)

See Also:


Attachments
Example project (12.29 KB, application/zip)
2020-05-06 11:27 EDT, Lars Vogel CLA
no flags Details
Example screenshot (17.97 KB, image/png)
2020-05-06 11:29 EDT, Lars Vogel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2020-05-06 11:27:54 EDT
Created attachment 282730 [details]
Example project

If I call part.getToolbar().setToBeRendered(false) and 		part.getToolbar().setToBeRendered(true); this breaks the layout of the view.

See attached example. Click on the view to trigger its focus method which calls:


	@Focus
	public void setFocus(MPart part) {
		tableViewer.getTable().setFocus();
		part.getToolbar().setToBeRendered(false);
		part.getToolbar().setToBeRendered(true);
		
	}
Comment 1 Lars Vogel CLA 2020-05-06 11:29:33 EDT
Created attachment 282731 [details]
Example screenshot
Comment 2 Lars Vogel CLA 2020-05-06 11:30:10 EDT
Rolf, do you know if that is a known issue? Is there a workaround to re-trigger the layout?
Comment 3 Rolf Theunissen CLA 2020-05-06 11:40:24 EDT
I have seen this issue, but never investigated it. But I assume that some (or almost all) of the code in ActionBars#updateActionbars() should be moved into the ToolBarManagerRenderer to fix this issue.
Comment 4 Lars Vogel CLA 2020-05-06 12:20:52 EDT
Rolf, so you know a way to renderer a model element in the ui? Would be useful for debugging.
Comment 5 Lars Vogel CLA 2020-05-06 12:22:31 EDT
Re-render, i.e. tell the platform to re-render a certain model element
Comment 6 Rolf Theunissen CLA 2020-05-06 17:12:43 EDT
I use the model-spy to trigger these changes. Just flipping a toggle button to render/un-render an element.

I have been looking at the issue a bit now, the problem originates in the StackRenderer. Will push a Gerrit soon, that shows the experiment.
Comment 7 Eclipse Genie CLA 2020-05-06 17:17:42 EDT
New Gerrit change created: https://git.eclipse.org/r/162592
Comment 8 Rolf Theunissen CLA 2020-05-11 06:18:39 EDT
*** Bug 550268 has been marked as a duplicate of this bug. ***
Comment 10 Lars Vogel CLA 2020-06-09 11:54:53 EDT
Thanks, Roland.
Comment 11 Lars Vogel CLA 2020-07-07 15:40:36 EDT
(In reply to Lars Vogel from comment #10)
> Thanks, Roland.

Sorry, should have been: Thanks, Rolf
Comment 12 Christoph Laeubrich CLA 2020-07-08 02:15:45 EDT
*** Bug 563750 has been marked as a duplicate of this bug. ***