@NotNull
public BeanPopupMenuCreator<T> getBeanPopupMenuCreator() {
if ( beanPopupMenuCreator == null ) {
beanPopupMenuCreator = new BeanPopupMenuCreator<T>() {
public JPopupMenu createMenu( @NotNull BeanListView<T> beanListView ) {
CommandGroup commandGroup = getWindowCommandManager().createCommandGroup( getBeanType().getName() + ".tablePopupGroup", new Object[0] );
commandGroup.add( getWindowCommandManager().configure( getCommandFactory().getNewCommand() ) );
if ( isSelectionNotEmpty() ) {
commandGroup.add( getWindowCommandManager().configure( getCommandFactory().getPropertiesCommand() ) );
commandGroup.add( getWindowCommandManager().configure( getCommandFactory().getDeleteCommand() ) );
}
return commandGroup.createPopupMenu();
}
};
}
return beanPopupMenuCreator;
}