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

Bug 550259

Summary: Update IDE e4 command templates to remove menu / command / handers if the plug-in is not present
Product: [Eclipse Project] PDE Reporter: Lars Vogel <Lars.Vogel>
Component: UIAssignee: Lars Vogel <Lars.Vogel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Lars.Vogel, rolf.theunissen, Vikas.Chandra
Version: 4.12   
Target Milestone: 4.18 M1   
Hardware: PC   
OS: Linux   
See Also: https://git.eclipse.org/r/147979
https://git.eclipse.org/r/c/pde/eclipse.pde.ui/+/169625
https://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=56ac7400dc777c9f500a228608511ef6b58d3799
Whiteboard:
Bug Depends on:    
Bug Blocks: 566539    

Description Lars Vogel CLA 2019-08-20 05:55:21 EDT

    
Comment 1 Lars Vogel CLA 2019-08-20 05:59:43 EDT
For views I think we have at least to set the removeOnHide flag.
Comment 2 Eclipse Genie CLA 2019-08-20 06:00:57 EDT
New Gerrit change created: https://git.eclipse.org/r/147979
Comment 3 Rolf Theunissen CLA 2019-08-20 10:46:01 EDT
Not sure what you are trying to accomplish. Non of the view-descriptors have the removeOnHide tag set. What is the current problem?
Comment 4 Lars Vogel CLA 2019-08-22 13:25:48 EDT
(In reply to Rolf Theunissen from comment #3)
> Not sure what you are trying to accomplish. Non of the view-descriptors have
> the removeOnHide tag set. What is the current problem?

If the plugin is uninstalled, the contribution should be gone.
Comment 5 Rolf Theunissen CLA 2019-08-23 02:53:51 EDT
Setting the removeOnHide flag will only remove the view parts from the model, t will not remove the PartDescriptor. So the fragment will remain if the plugin is uninstalled. 
Furthermore, setting this flag will causes the workbench to forget the previous location of the view. It will always be opened in the default location, not the last location.

I think that a strategy based on 'contributionURI' would make more sense. When a plug-in is uninstalled the fragments could be removed. This 'dynamic' part of the workbench is however still broken in E4, see for instance Bug 405296.
Comment 6 Rolf Theunissen CLA 2019-08-23 03:04:47 EDT
It would make sense to set the 'persistState' tag. IWorkbench.PERSIST_STATE
Comment 7 Lars Vogel CLA 2019-08-26 03:27:22 EDT
(In reply to Rolf Theunissen from comment #6)
> It would make sense to set the 'persistState' tag. IWorkbench.PERSIST_STATE

+1, I will update the Gerrit accordingly for 4.14 M1.
Comment 8 Rolf Theunissen CLA 2019-08-26 04:16:10 EDT
(In reply to Lars Vogel from comment #7)
> (In reply to Rolf Theunissen from comment #6)
> > It would make sense to set the 'persistState' tag. IWorkbench.PERSIST_STATE
> 
> +1, I will update the Gerrit accordingly for 4.14 M1.

On second thought, views will always be closed on restart if this flag is set.
Comment 9 Lars Vogel CLA 2019-09-17 09:40:26 EDT
(In reply to Rolf Theunissen from comment #8)
> (In reply to Lars Vogel from comment #7)
> > (In reply to Rolf Theunissen from comment #6)
> > > It would make sense to set the 'persistState' tag. IWorkbench.PERSIST_STATE
> > 
> > +1, I will update the Gerrit accordingly for 4.14 M1.
> 
> On second thought, views will always be closed on restart if this flag is
> set.

I agree for views this would be wrong. I think we should set it for the commands and handlers e4 templates to that these elements to not stay in the IDE after their plug-ins are uninstalled. See also Bug 551167.
Comment 10 Vikas Chandra CLA 2019-11-14 05:29:49 EST
Lars, is this in plan for 4.14M3?
Comment 11 Lars Vogel CLA 2019-11-14 05:35:25 EST
(In reply to Vikas Chandra from comment #10)
> Lars, is this in plan for 4.14M3?

Lets move to RC1.
Comment 12 Eclipse Genie CLA 2020-09-20 01:36:10 EDT
New Gerrit change created: https://git.eclipse.org/r/c/pde/eclipse.pde.ui/+/169625
Comment 14 Vikas Chandra CLA 2020-10-06 09:05:35 EDT
Lars, can you please verify this bug.