use of org.eclipse.emf.eef.runtime.context.impl.EObjectPropertiesEditionContext in project InformationSystem by ObeoNetwork.
the class TableForeignKeysPropertiesEditionComponent method updateSemanticModel.
/**
* {@inheritDoc}
* @see org.eclipse.emf.eef.runtime.impl.components.StandardPropertiesEditionComponent#updateSemanticModel(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)
*/
public void updateSemanticModel(final IPropertiesEditionEvent event) {
Table table = (Table) semanticObject;
if (DatabaseViewsRepository.ForeignKeys.Properties.foreignKeys_ == event.getAffectedEditor()) {
if (event.getKind() == PropertiesEditionEvent.ADD) {
EReferencePropertiesEditionContext context = new EReferencePropertiesEditionContext(editingContext, this, foreignKeysSettings, editingContext.getAdapterFactory());
PropertiesEditingProvider provider = (PropertiesEditingProvider) editingContext.getAdapterFactory().adapt(semanticObject, PropertiesEditingProvider.class);
if (provider != null) {
PropertiesEditingPolicy policy = provider.getPolicy(context);
if (policy instanceof CreateEditingPolicy) {
policy.execute();
}
}
} else if (event.getKind() == PropertiesEditionEvent.EDIT) {
EObjectPropertiesEditionContext context = new EObjectPropertiesEditionContext(editingContext, this, (EObject) event.getNewValue(), editingContext.getAdapterFactory());
PropertiesEditingProvider provider = (PropertiesEditingProvider) editingContext.getAdapterFactory().adapt((EObject) event.getNewValue(), PropertiesEditingProvider.class);
if (provider != null) {
PropertiesEditingPolicy editionPolicy = provider.getPolicy(context);
if (editionPolicy != null) {
editionPolicy.execute();
}
}
} else if (event.getKind() == PropertiesEditionEvent.REMOVE) {
foreignKeysSettings.removeFromReference((EObject) event.getNewValue());
} else if (event.getKind() == PropertiesEditionEvent.MOVE) {
foreignKeysSettings.move(event.getNewIndex(), (ForeignKey) event.getNewValue());
}
}
}
use of org.eclipse.emf.eef.runtime.context.impl.EObjectPropertiesEditionContext in project InformationSystem by ObeoNetwork.
the class FinalStatePropertiesEditionPartImpl method editOutcomingTransitions.
/**
*/
protected void editOutcomingTransitions(EObject element) {
EObjectPropertiesEditionContext context = new EObjectPropertiesEditionContext(propertiesEditionComponent.getEditingContext(), propertiesEditionComponent, element, adapterFactory);
PropertiesEditingProvider provider = (PropertiesEditingProvider) adapterFactory.adapt(element, PropertiesEditingProvider.class);
if (provider != null) {
PropertiesEditingPolicy policy = provider.getPolicy(context);
if (policy != null) {
policy.execute();
outcomingTransitions.refresh();
}
}
}
use of org.eclipse.emf.eef.runtime.context.impl.EObjectPropertiesEditionContext in project InformationSystem by ObeoNetwork.
the class FinalStatePropertiesEditionPartImpl method editIncomingTransitions.
/**
*/
protected void editIncomingTransitions(EObject element) {
EObjectPropertiesEditionContext context = new EObjectPropertiesEditionContext(propertiesEditionComponent.getEditingContext(), propertiesEditionComponent, element, adapterFactory);
PropertiesEditingProvider provider = (PropertiesEditingProvider) adapterFactory.adapt(element, PropertiesEditingProvider.class);
if (provider != null) {
PropertiesEditingPolicy policy = provider.getPolicy(context);
if (policy != null) {
policy.execute();
incomingTransitions.refresh();
}
}
}
use of org.eclipse.emf.eef.runtime.context.impl.EObjectPropertiesEditionContext in project InformationSystem by ObeoNetwork.
the class InitialStatePropertiesEditionPartImpl method editOutcomingTransitions.
/**
*/
protected void editOutcomingTransitions(EObject element) {
EObjectPropertiesEditionContext context = new EObjectPropertiesEditionContext(propertiesEditionComponent.getEditingContext(), propertiesEditionComponent, element, adapterFactory);
PropertiesEditingProvider provider = (PropertiesEditingProvider) adapterFactory.adapt(element, PropertiesEditingProvider.class);
if (provider != null) {
PropertiesEditingPolicy policy = provider.getPolicy(context);
if (policy != null) {
policy.execute();
outcomingTransitions.refresh();
}
}
}
use of org.eclipse.emf.eef.runtime.context.impl.EObjectPropertiesEditionContext in project InformationSystem by ObeoNetwork.
the class StatePropertiesEditionPartImpl method editOutcomingTransitions.
/**
*/
protected void editOutcomingTransitions(EObject element) {
EObjectPropertiesEditionContext context = new EObjectPropertiesEditionContext(propertiesEditionComponent.getEditingContext(), propertiesEditionComponent, element, adapterFactory);
PropertiesEditingProvider provider = (PropertiesEditingProvider) adapterFactory.adapt(element, PropertiesEditingProvider.class);
if (provider != null) {
PropertiesEditingPolicy policy = provider.getPolicy(context);
if (policy != null) {
policy.execute();
outcomingTransitions.refresh();
}
}
}
Aggregations