@Override public void dispose() { super.dispose(); deactivatePlanServices(); services = null; // Dispose the adapter factory AdapterFactory adapterFactory = EMFUtils.getAdapterFactory(editingDomain); if (adapterFactory instanceof IDisposable) { ((IDisposable)adapterFactory).dispose(); } // Dispose the plan data once all the listeners are removed WrapperUtils.dispose(plan); editingDomain = null; }