Community
Participate
Working Groups
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.
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.
(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".
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.
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.