use of org.apache.cayenne.modeler.event.EmbeddableDisplayEvent in project cayenne by apache.
the class EmbeddableAttributeDisplayEventType method fireLastDisplayEvent.
@Override
public void fireLastDisplayEvent() {
DataChannelDescriptor dataChannel = (DataChannelDescriptor) controller.getProject().getRootNode();
if (!dataChannel.getName().equals(preferences.getDomain())) {
return;
}
DataMap dataMap = dataChannel.getDataMap(preferences.getDataMap());
if (dataMap == null) {
return;
}
Embeddable embeddable = dataMap.getEmbeddable(preferences.getEmbeddable());
if (embeddable == null) {
return;
}
EmbeddableDisplayEvent embeddableDisplayEvent = new EmbeddableDisplayEvent(this, embeddable, dataMap, dataChannel);
controller.fireEmbeddableDisplayEvent(embeddableDisplayEvent);
EmbeddableAttribute[] embeddableAttributes = getLastEmbeddableAttributes(embeddable);
EmbeddableAttributeDisplayEvent attributeDisplayEvent = new EmbeddableAttributeDisplayEvent(this, embeddable, embeddableAttributes, dataMap, dataChannel);
controller.fireEmbeddableAttributeDisplayEvent(attributeDisplayEvent);
}
Aggregations