this.possibleTypesServiceListener = new Listener()
{
@Override
public void handle( final Event event )
{
broadcast( new Event() );
}
};
this.nodeFactoryListener = new FilteredListener<PartVisibilityEvent>()
{
@Override
protected void handleTypedEvent( final PartVisibilityEvent event )
{
broadcast( new Event() );
}
};
final MasterDetailsContentNodePart node = (MasterDetailsContentNodePart) getPart();
node.executeAfterInitialization
(
new Runnable()
{
public void run()
{
for( MasterDetailsContentNodePart.NodeFactory factory : node.factories() )
{
factory.attach( OutlineNodeAddActionHandlerFactory.this.nodeFactoryListener );
final PossibleTypesService possibleTypesService = factory.property().service( PossibleTypesService.class );
possibleTypesService.attach( OutlineNodeAddActionHandlerFactory.this.possibleTypesServiceListener );
}
broadcast( new Event() );
}
}
);
}