Bug 569777

Summary: Consider replacing handling of Opaque model elements with persistState=false
Product: [Eclipse Project] Platform Reporter: Lars Vogel <Lars.Vogel>
Component: UIAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: Lars.Vogel, rolf.theunissen
Version: 4.18   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on: 378815    
Bug Blocks:    

Description Lars Vogel CLA 2020-12-17 07:33:02 EST
AFAIK the Opaque handling in the IDE was introduce to translate e3 elements into e4 model elements. We have special coding in the IDE to create model elements tagged with "Opaque" and extra code to remove these from the persisted application model.

In Bug 378815 we implemented support for persistState=false which avoids persisting model elements during shutdown.

See https://www.eclipse.org/eclipse/news/4.11/platform_isv.php

part.getPersistedState().put(IWorkbench.PERSIST_STATE, "false");

So it seems to me that we could remove the "Opaque" handling and use the IWorkbench.PERSIST_STATE flag instead.
Comment 1 Rolf Theunissen CLA 2020-12-24 09:12:21 EST
I am not sure if we can remove this. Besides the non-persistence of Opaque elements, the elements are handled completely different in the ToolBar and Menu renderers. For opaque elements, the E3 APIs are used to render, e.g. the fill on the contribution item, to maintain compatibility.
Besides, there are some mayor issues in how Opaque and normal items are handled. Many of the bugs related to the menu and toolbar issues related to having opaque items, I expect things get worse when we just remove them. I still thinking about doing a major redesign here, but need some time to describe the real problem, then can start thinking about solutions.