use of org.cytoscape.cmdline.CommandLineArgs in project cytoscape-impl by cytoscape.
the class CyActivator method start.
public void start(BundleContext bc) {
CommandLineArgs args = getService(bc, CommandLineArgs.class);
CyVersion cyVersion = getService(bc, CyVersion.class);
CyShutdown cyShutdown = getService(bc, CyShutdown.class);
StreamUtil streamUtil = getService(bc, StreamUtil.class);
OpenSessionTaskFactory loadSession = getService(bc, OpenSessionTaskFactory.class);
LoadNetworkFileTaskFactory networkFileLoader = getService(bc, LoadNetworkFileTaskFactory.class);
LoadNetworkURLTaskFactory networkURLLoader = getService(bc, LoadNetworkURLTaskFactory.class);
LoadVizmapFileTaskFactory visualStylesLoader = getService(bc, LoadVizmapFileTaskFactory.class);
TaskManager<?, ?> taskManager = getService(bc, TaskManager.class);
CyServiceRegistrar registrar = getService(bc, CyServiceRegistrar.class);
CyProperty<Properties> props = (CyProperty<Properties>) getService(bc, CyProperty.class, "(cyPropertyName=cytoscape3.props)");
StartupConfig sc = new StartupConfig(props.getProperties(), streamUtil, loadSession, networkFileLoader, networkURLLoader, visualStylesLoader, taskManager, registrar);
Parser p = new Parser(args.getArgs(), cyShutdown, cyVersion, sc, props.getProperties());
sc.start();
}
use of org.cytoscape.cmdline.CommandLineArgs in project cytoscape-impl by cytoscape.
the class CyActivator method start.
public void start(BundleContext bc) {
final CommandLineArgs args = getService(bc, CommandLineArgs.class);
final CyVersion cyVersion = getService(bc, CyVersion.class);
final CyShutdown cyShutdown = getService(bc, CyShutdown.class);
final AvailableCommands availableCommands = getService(bc, AvailableCommands.class);
final CommandExecutorTaskFactory cmdExec = getService(bc, CommandExecutorTaskFactory.class);
final SynchronousTaskManager taskManager = getService(bc, SynchronousTaskManager.class);
new Thread(new Runnable() {
public void run() {
StartupConfig sc = new StartupConfig(cmdExec, taskManager);
Parser p = new Parser(args.getArgs(), cyShutdown, cyVersion, sc, availableCommands);
sc.start();
try {
Thread.sleep(200);
} catch (InterruptedException ie) {
ie.printStackTrace();
}
cyShutdown.exit(0);
}
}).start();
}
Aggregations