if (odomEditorContext == null) {
throw new IllegalArgumentException(
"The ODOM editor context parameter may not be null."); //$NON-NLS-1$
}
this.odomEditorContext = odomEditorContext;
final LayoutEditorContext layoutEditorContext =
((LayoutODOMEditorContext) odomEditorContext).getLayoutEditorContext();
final InteractionEventListenerAdapter readOnlyListener =
new InteractionEventListenerAdapter() {
public void readOnlyStateChanged(
final ReadOnlyStateChangedEvent event) {
if (event.isOriginator ()) {
mainTabDetails.updateEnablement();
rowTabDetails.updateEnablement();
columnTabDetails.updateEnablement();
}
}
};
layoutEditorContext.addSelectedVariantListener(new BuilderSelectionListener() {
public void selectionMade(final BuilderSelectionEvent event) {
if (event.getOldSelection() != null) {
((Proxy) event.getOldSelection()).removeListener(readOnlyListener);
}