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(uri);
	}
	public void setInternalId(EObject object, String id) {
		objectMap.put(object, id);
	}
	public String getInternalId(EObject object) {
		return objectMap.get(object);
	}
	@Override
	protected boolean useIDs() {
		return true;
	}
	private String createId() {
		return EcoreUtil.generateUUID();
	}
	private String getUniqueId() {
		String id = createId();
		while (objectMap.get(id) != null) {
			id = createId();
		}
		return id;
	}
	@Override
	public void setID(EObject eObject, String id) {
		if (id != null) {
			String internalId = objectMap.get(eObject);
			if (internalId != null) {
				super.setID(eObject, internalId);
			}
			objectMap.put(eObject, id);