Bug 563974 - Delete PerspectiveBarContributionItem and related as they are unused.
Summary: Delete PerspectiveBarContributionItem and related as they are unused.
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   Edit
Assignee: Rolf Theunissen CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 564144
  Show dependency tree
 
Reported: 2020-06-05 05:05 EDT by Lars Vogel CLA
Modified: 2020-06-15 09:26 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2020-06-05 05:05:00 EDT

    
Comment 1 Lars Vogel CLA 2020-06-05 05:05:25 EDT
From https://git.eclipse.org/r/#/c/163438/1/bundles/org.eclipse.ui.workbench/Eclipse+UI/org/eclipse/ui/internal/PerspectiveBarContributionItem.java

Quote: Isn't this contribution item obsolete, i.e. dead code? It seems that the current perspective switcher is implemented in 

org.eclipse.e4.ui.workbench.addons.perspectiveswitcher.PerspectiveSwitcher

Is also true for the PerspectiveBarNewContributionItem class.
Moreover, PerspectiveAction class and its children seem obsolete too. How about the other Perspective* classes?
Comment 2 Lars Vogel CLA 2020-06-05 05:07:41 EDT
Rolf, can you take this one as you discovered it?
Comment 3 Rolf Theunissen CLA 2020-06-05 15:22:55 EDT
On a closer look, ToggleEditorsVisibilityAction (extends PerspectiveAction) is registered as global action with the id 'org.eclipse.ui.window.hideShowEditors'. 

This action is not used in Platform, should I consider this API? i.e. is it allowed to remove that class?
Comment 4 Lars Vogel CLA 2020-06-06 10:16:29 EDT
(In reply to Rolf Theunissen from comment #3)
> On a closer look, ToggleEditorsVisibilityAction (extends PerspectiveAction)
> is registered as global action with the id
> 'org.eclipse.ui.window.hideShowEditors'. 
> 
> This action is not used in Platform, should I consider this API? i.e. is it
> allowed to remove that class?

As ToggleEditorsVisibilityAction is internal I would say it is not API. If API tooling does not give an error, I suggest to go ahead and remove it.
Comment 5 Rolf Theunissen CLA 2020-06-09 16:07:39 EDT
(In reply to Lars Vogel from comment #4)
> (In reply to Rolf Theunissen from comment #3)
> > On a closer look, ToggleEditorsVisibilityAction (extends PerspectiveAction)
> > is registered as global action with the id
> > 'org.eclipse.ui.window.hideShowEditors'. 
> > 
> > This action is not used in Platform, should I consider this API? i.e. is it
> > allowed to remove that class?
> 
> As ToggleEditorsVisibilityAction is internal I would say it is not API. If
> API tooling does not give an error, I suggest to go ahead and remove it.

That class is currently exported via the org.eclipse.ui.actions.ActionFactory.SHOW_EDITOR field. That is API. So the action cannot be removed without consequences. It can be replaced by a Handler, but that is out of scope of this bug.
Comment 6 Lars Vogel CLA 2020-06-09 16:32:55 EDT
You could asked the PMC to mark it for deletion if it is not used by platform...
Comment 7 Eclipse Genie CLA 2020-06-13 08:52:05 EDT
New Gerrit change created: https://git.eclipse.org/r/164823
Comment 9 Lars Vogel CLA 2020-06-15 09:26:04 EDT
Thanks, Rolf.