@Override
public void init( final SapphireAction action, final ActionHandlerDef def )
{
super.init( action, def );
final Element element = ( (MasterDetailsContentNodePart) getPart() ).getLocalModelElement();
final Listener listener = new FilteredListener<PropertyContentEvent>()
{
@Override
protected void handleTypedEvent( final PropertyContentEvent event )
{
refreshVisibility();
}
};
element.attach( listener, ModelPath.ALL_DESCENDENTS );
refreshVisibility();
attach
(
new Listener()
{
@Override
public void handle( final Event event )
{
if( event instanceof DisposeEvent )
{
element.detach( listener, ModelPath.ALL_DESCENDENTS );
}
}
}
);
}