Bug 308629 [Compatibility] NPE thrown when restarting Eclipse
It's trying to add bindings to the application and failing. java.lang.NullPointerException at org.eclipse.emf.common.util.AbstractEList.getNonDuplicates(AbstractEList.java:1167) at org.eclipse.emf.common.util.AbstractEList.addAll(AbstractEList.java:372) at org.eclipse.e4.ui.model.application.impl.ApplicationImpl.eSet(ApplicationImpl.java:417) 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.ModelReconcilingService.applyDeltas(ModelReconcilingService.java:54) at org.eclipse.e4.workbench.ui.internal.ModelReconcilingService.applyDeltas(ModelReconcilingService.java:36) at org.eclipse.e4.workbench.ui.internal.ResourceHandler.loadMostRecentModel(ResourceHandler.java:173) at org.eclipse.e4.ui.workbench.swt.internal.E4Application.loadApplicationModel(E4Application.java:194) at org.eclipse.e4.ui.workbench.swt.internal.E4Application.createE4Workbench(E4Application.java:129)
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/workbench/ui/internal/XMLModelReconciler.java
for (int i = 0; i < referencedIds.getLength(); i++) {
			Node item = referencedIds.item(i);
			if (item instanceof Element) {
				Element reference = (Element) item;
				if (isUnset(reference)) {
					userReferences.add(createObject(deltas, reference, references));
				} else {
					String referenceId = reference.getAttribute(APPLICATIONELEMENT_ID_ATTNAME);
					Object match = findReference(references, referenceId);
					if (match != null) {
						
						
						if (reference.getNodeName().equals(REFERENCE_ELEMENT_NAME)) {
							userReferences.add(match);
						} else {
							originalReferences.add(match);
						}
					}
				}
			}
		}
		return new EMFModelDeltaThreeWayDelayedSet(eObject, feature, originalReferences,
				userReferences, currentReferences);
	}
	private static EObject createObject(String namespace, String type) {
		EFactory factory = EPackage.Registry.INSTANCE.getEFactory(namespace);
		for (EClassifier classifier : factory.getEPackage().getEClassifiers()) {
			if (classifier instanceof EClass) {
				EClass cls = (EClass) classifier;
				if (cls.getInstanceClassName().equals(type)) {