Bug 305792 [Model] E4XMIResource fails when creating a resource with ModelComponents
The problem is that the ID generation stuff expects that everything is ApplicationElement which is not correct for the ModelComponents-Element. We should check for the case that the EObject is not an MApplicationElement and only set the xml:id in this case.
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/workbench/ui/internal/E4XMIResource.java
}
		super.setID(eObject, id);
	}
	@Override
	public String getID(EObject eObject) {
		if (eObject instanceof Entry<?, ?>) {
			return null;
		}
		String id = super.getID(eObject);
		if (id != null) {
			return id;
		}
		id = objectMap.get(eObject);
		if (id != null) {
			return id;
		}
		MApplicationElement element = (MApplicationElement) eObject;
		id = element.getId();
		if (id != null && id.length() != 0) {
			id = getUniqueId();
			setID(eObject, id);
			return id;
		}
		id = getUniqueId();
		element.setId(id);
		setID(eObject, id);
		return id;
	}
}