@Override protected void eBasicSetContainer(InternalEObject eContainer) { this.eContainer = eContainer; if (nonNull(eContainer) && eContainer.eResource() != resource) { resource((Resource.Internal) this.eContainer.eResource()); } }
@Override public NotificationChain eSetResource(Internal resource, NotificationChain notifications) { EmfFragActivator.instance.globalEventListener.onInternalObjectSetResource(this, resource); Resource oldResource = eResource(); NotificationChain result = super.eSetResource(resource, notifications); updateAfterResourceChange(oldResource); return result; }
@Override protected EStructuralFeature.Internal.SettingDelegate eSettingDelegate(final EStructuralFeature eFeature) { FragmentationType type = EMFFragUtil.getFragmentationType(eFeature); if (type == FragmentationType.None || type == FragmentationType.FragmentsContainment) { return ((EStructuralFeature.Internal) eFeature).getSettingDelegate(); } else { return new EStructuralFeatureImpl.InternalSettingDelegateMany(EStructuralFeatureImpl.InternalSettingDelegateMany.DATA_DYNAMIC, eFeature) { @Override protected Setting createDynamicSetting(InternalEObject owner) { int kind = EcoreEList.Generic.kind(eFeature); return new FValueSetList(kind, FInternalObjectImpl.class, FInternalObjectImpl.this, eFeature); } }; } }
@Override @Nullable public Internal resource() { return resource; }
@Override protected void eSetDirectResource(Internal resource) { assert !isFrozen() : "A frozen model should not be modified"; super.eSetDirectResource(resource); }
/** * Changes the super class behavior so that the fragmented model is always * returned as the objects resource. */ @Override public Internal eDirectResource() { return (Internal) fInternalObject().getFragmentation(); }
/** * Constructs a new {@code DirectWriteBlueprintsCacheManyStore} between the given {@code resource} and the * {@code backend}. * * @param resource the resource to persist and access * @param backend the persistence back-end used to store the model */ public DirectWriteBlueprintsCacheManyStore(Internal resource, BlueprintsPersistenceBackend backend) { super(resource, backend); this.verticesCache = Caffeine.newBuilder().maximumSize(DEFAULT_CACHE_SIZE).build(); }