refreshActionState();
}
};
final Element element = getModelElement();
final IValuePropertyActionsGallery gallery = element.nearest( IValuePropertyActionsGallery.class );
final String propertyName = property().name();
gallery.attach( listener, "Entities/*" );
element.attach( listener, propertyName );
refreshActionState();
attach
(
new FilteredListener<DisposeEvent>()
{
@Override
protected void handleTypedEvent( final DisposeEvent event )
{
gallery.detach( listener, "Entities/*" );
element.detach( listener, propertyName );
}
}
);
}