Java 类org.eclipse.emf.edit.provider.IDisposable 实例源码

项目:OpenSPIFe    文件:PlanEditorModel.java   
@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;
}