public void fillContextMenu( IMenuManager menu )
{
ConnectionsView view = Activator.getDefault().getConnectionsView();
NeoGraphViewPart neoGraphView = Activator.getDefault().getNeoGraphViewPart();
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