Bug 461667 - Pin Editor not present in editor tab context menu
Summary: Pin Editor not present in editor tab context menu
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.5   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-08 15:14 EDT by Noopur Gupta CLA
Modified: 2020-03-25 12:23 EDT (History)
6 users (show)

See Also:


Attachments
Pin behavior (20.22 KB, image/png)
2020-03-25 12:23 EDT, Wim Jongman CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Noopur Gupta CLA 2015-03-08 15:14:14 EDT
When "Close editors automatically" is enabled in Window > Preferences > General > Editors, we do not get "Pin Editor" action in an editor tab context menu. This was present in 3.x.
Comment 1 Andrey Loskutov CLA 2015-03-08 15:22:05 EDT
The responsible class for ALL tab menus is /org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/StackRenderer.java

The problem AFAIK is that we don't know which MPart is an "editor" and which is a "view" in e4 since new modelled parts (MPart) can represent everything and only "legacy" ones must implement IEditorPart.
Comment 2 Lars Vogel CLA 2015-03-08 18:33:52 EDT
(In reply to Andrey Loskutov from comment #1)
> The responsible class for ALL tab menus is
> /org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/
> renderers/swt/StackRenderer.java
> 
> The problem AFAIK is that we don't know which MPart is an "editor" and which
> is a "view" in e4 since new modelled parts (MPart) can represent everything
> and only "legacy" ones must implement IEditorPart.

We use tags to identify if a part is a view or an editor. A editor is tagged with "Editor" while a view is taggged with "View". You can see then via the Model Spy (update site: http://dl.bintray.com/vogellacompany/e4tools/) and open it via Ctrl+3 and by entering "Model Spy".
Comment 3 Thomas Schindl CLA 2015-03-08 19:25:13 EDT
The problem might be that even if you know it is an editor, the e4 renderer must not know about this pin-feature. 

IMHO the compat layer needs to generate a Menu-Entry when it translates the editor extension point.
Comment 4 Wim Jongman CLA 2020-03-25 12:23:29 EDT
Created attachment 282227 [details]
Pin behavior

I just saw this pin-editor appear. Is it not removing editors in auto-close mode? Maybe it should also not remove the editor if close all, close others or close to the right is used.