I'm developing an eclipse plugin using e4 technologies intended to be run in Eclipse IDE.

How can I add my part (defined as 'PartDescriptor' in fragment.e4xmi file in my plugin) into the "Show View" dialog tree (main menu > Window > Show View > Other ...) ?

Based on examination of org.eclipse.e4.ui.workbench.swt.internal.copy.ViewContentProvider#createChildren source code and based on examination of PartDescriptors of other parts using Live Application Model part I tried to add following tags to my PartDescriptor on Supplementary tab:

  • View
  • categoryTag:MyGroup

However, it doesn't work for me. I use Eclipse 4.3 and e4 0.14.

有帮助吗?

解决方案

It's not possible, says Thomas Schindl at http://www.eclipse.org/forums/index.php/t/499424/

Hello.

How can I add my part (defined as 'PartDescriptor' in fragment.e4xmi file in my plugin) into the "Show View" dialog tree (main menu > Window > Show View > Other ...) ?

Based on examination of org.eclipse.e4.ui.workbench.swt.internal.copy.ViewContentProvider#createChildren source code and based on examination of PartDescriptors of other parts using Live Application Model part I tried to add following tags to my PartDescriptor on Supplementary tab:

View categoryTag:MyGroup

However, it doesn't work for me. I use Eclipse 4.3 and e4 0.14.

Thans for answers.


I don't think this is the class making up the Show View ... content in the compat layer which is constructed from IViewDescriptors IIRC. Hence if you contribute through a fragment it can't show up there.

Tom

其他提示

It's possible in 4.6.3 (and possibly before that).

You still need the View tag, but categoryTag apparently has been deprecated. Instead, there now is a Category field in MPartDescriptor, which can be set via the Eclipse e4 model editor:

Eclipse e4 model editor screenshot

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top