Bug 303841 Model ids should not be used as resource ids
Merging can go wrong here because model ids are only unique within a given scope. java.lang.ClassCastException: org.eclipse.e4.ui.model.application.impl.CommandImpl cannot be cast to org.eclipse.e4.ui.model.application.MPerspective at org.eclipse.e4.ui.model.application.impl.PerspectiveStackImpl.eSet(PerspectiveStackImpl.java:201) at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSet(BasicEObjectImpl.java:1081) at org.eclipse.e4.workbench.ui.internal.EMFModelDeltaSet.apply(EMFModelDeltaSet.java:31) at org.eclipse.e4.workbench.ui.internal.EMFModelDeltaDelayedSet.apply(EMFModelDeltaDelayedSet.java:44) at org.eclipse.e4.workbench.ui.internal.ModelReconcilingService.applyDeltas(ModelReconcilingService.java:53) at org.eclipse.e4.workbench.ui.internal.ModelReconcilingService.applyDeltas(ModelReconcilingService.java:35) at org.eclipse.e4.workbench.ui.internal.ResourceHandler.loadMostRecentModel(ResourceHandler.java:172)
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/workbench/ui/internal/E4XMIResource.java
/*******************************************************************************
 * Copyright (c) 2009 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 ******************************************************************************/
package org.eclipse.e4.workbench.ui.internal;
import java.util.Map;
import java.util.WeakHashMap;
import org.eclipse.e4.ui.model.application.MApplicationElement;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl;
public class E4XMIResource extends XMIResourceImpl {