GraphDbServiceManager graphDbServiceManager = Activator.getDefault().getGraphDbServiceManager();
Alias alias = view.getSelectedAlias();
if ( alias == null )
{
addAction( menu, new NewAliasAction() );
return;
}
if ( graphDbServiceManager.isRunning() && graphDbServiceManager.getCurrentAlias().equals( alias ) )
{
addAction( menu, new StopAction( neoGraphView ) );
addAction( menu, new ExportToXmlAction() );
addAction( menu, new ExportToJsonAction() );
}
else
{
if ( !graphDbServiceManager.isRunning() )
{
addAction( menu, new StartAction( neoGraphView ) );
menu.add( new Separator() );
}
else
{
addAction( menu, new ForceStartAction( neoGraphView ) );
menu.add( new Separator() );
}
addAction( menu, new NewAliasAction() );
addAction( menu, new EditAliasAction() );
addAction( menu, new DeleteAliasAction() );
}
}