When I call MApplication.getDescriptors() (e.g. in a handler), I see the method returning an empty list. In my application model, I defined various parts and, thus, I'd rather expect a non empty list of MPartDescriptor instances, one for each xsi:type="basic:Part" element I defined in my application model.

Do I have to do something for that I get the expected result?

The background of my question is that the org.eclipse.e4.ui.internal.workbench.swt.handlers.ShowViewHandler displays an empty dialog window in my pure E4 application.

In a pure e4 context, defining a MPart does not automatically mean defining a MPartDescriptor. MPDs are different things in terms of model elements. The MApplication#getDescriptors() will return the list of MPartDescriptors that were explicitly defined, be it programmatically or through the tooling editor.

Thank you, Sopot, for your reply.
Thanks to this hint I added some descriptors nodes to my application model (having the tags 'View' and 'categoryTag:My Category'). Now, the ShowViewHandler works as expected.

How can I define a PartDescriptor in a model fragment?

I tried it straight forward by adding an element xsi:type="basic_1:PartDescriptor" to the fragments node (in the fragments model). Doing this, however, results in the following error at startup time:
===
java.lang.ClassCastException: org.eclipse.e4.ui.model.application.descriptor.basic.impl.PartDescriptorImpl cannot be cast to org.eclipse.e4.ui.model.application.ui.MUIElement
at org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl$1.validate(ElementContainerImpl.java:1)
at org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList.java:437)
at org.eclipse.emf.common.notify.impl.NotifyingListImpl.doAddUnique(NotifyingListImpl.java:387)
at org.eclipse.emf.common.notify.impl.NotifyingListImpl.addUnique(NotifyingListImpl.java:371)
at org.eclipse.emf.common.util.AbstractEList.add(AbstractEList.java:339)
at org.eclipse.e4.ui.model.internal.ModelUtils.mergeList(ModelUtils.java:201)
at org.eclipse.e4.ui.model.internal.ModelUtils.merge(ModelUtils.java:135)
at org.eclipse.e4.ui.model.fragment.impl.StringModelFragmentImpl.merge(StringModelFragmentImpl.java:288)
at org.eclipse.e4.ui.internal.workbench.ModelAssembler.processModel(ModelAssembler.java:167)
at org.eclipse.e4.ui.internal.workbench.ResourceHandler.loadMostRecentModel(ResourceHandler.java:220)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.loadApplicationModel(E4Application.java:366)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:220)
at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:132)
at org.elbe.relations.internal.RelationsApplication.start(RelationsApplication.java:60)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
===
Here is the element I added to the fragment e4xmi:
===
<elements xsi:type="basic_1:PartDescriptor" xmi:id="_telpcKk1EeKhmYrZRO6sPg" label="My View" iconURI="platform:/plugin/org.elbe.relations.defaultBrowser/icons/relations.gif" tooltip="My View" contributionURI="bundleclass://org.elbe.relations.defaultBrowser/org.elbe.relations.defaultbrowser.internal.DefaultBrowserPart">
<tags>View</tags>
<tags>categoryTag:My Category</tags>
</elements>
===

No, no don't do it that way. When I say parent I don't mean the parent in the left-side tree in the editor. Every model element you add in the fragment has to have a parent in the main application model. Suppose you have two part stacks in the main model and you add a part through a fragment. In order to resolve ambiguity (which of the two part stacks you should add the part to?) you supply the ID of the parent model element (the correct part stack). Add the descriptor but in the model fragment metadata add it as a 'child' (feature) of your MApplication (supply the MApp's id and 'descriptors' featurename).