Search in sources :

Example 1 with CommandExecutorTaskFactory

use of org.cytoscape.command.CommandExecutorTaskFactory in project cytoscape-impl by cytoscape.

the class CyActivator method start.

@Override
public void start(BundleContext bc) {
    final CyServiceRegistrar serviceRegistrar = getService(bc, CyServiceRegistrar.class);
    CommandTunableInterceptorImpl interceptor = new CommandTunableInterceptorImpl();
    StringTunableHandlerFactory<FileTunableHandler> fileTHF = new SimpleStringTunableHandlerFactory<>(FileTunableHandler.class, File.class);
    StringTunableHandlerFactory<IntTunableHandler> intTHF = new SimpleStringTunableHandlerFactory<>(IntTunableHandler.class, Integer.class, int.class);
    StringTunableHandlerFactory<DoubleTunableHandler> doubleTHF = new SimpleStringTunableHandlerFactory<>(DoubleTunableHandler.class, Double.class, double.class);
    StringTunableHandlerFactory<FloatTunableHandler> floatTHF = new SimpleStringTunableHandlerFactory<>(FloatTunableHandler.class, Float.class, float.class);
    StringTunableHandlerFactory<LongTunableHandler> longTHF = new SimpleStringTunableHandlerFactory<>(LongTunableHandler.class, Long.class, long.class);
    StringTunableHandlerFactory<BooleanTunableHandler> booleanTHF = new SimpleStringTunableHandlerFactory<>(BooleanTunableHandler.class, Boolean.class, boolean.class);
    StringTunableHandlerFactory<StringTunableHandlerImpl> stringTHF = new SimpleStringTunableHandlerFactory<>(StringTunableHandlerImpl.class, String.class);
    StringTunableHandlerFactory<BoundedIntTunableHandler> boundedIntTHF = new SimpleStringTunableHandlerFactory<>(BoundedIntTunableHandler.class, BoundedInteger.class);
    StringTunableHandlerFactory<BoundedDoubleTunableHandler> boundedDoubleTHF = new SimpleStringTunableHandlerFactory<>(BoundedDoubleTunableHandler.class, BoundedDouble.class);
    StringTunableHandlerFactory<BoundedFloatTunableHandler> boundedFloatTHF = new SimpleStringTunableHandlerFactory<>(BoundedFloatTunableHandler.class, BoundedFloat.class);
    StringTunableHandlerFactory<BoundedLongTunableHandler> boundedLongTHF = new SimpleStringTunableHandlerFactory<>(BoundedLongTunableHandler.class, BoundedLong.class);
    StringTunableHandlerFactory<URLTunableHandler> urlTHF = new SimpleStringTunableHandlerFactory<>(URLTunableHandler.class, URL.class);
    StringTunableHandlerFactory<ListSingleTunableHandler> listSingleTHF = new SimpleStringTunableHandlerFactory<>(ListSingleTunableHandler.class, ListSingleSelection.class);
    StringTunableHandlerFactory<ListMultipleTunableHandler> listMultipleTHF = new SimpleStringTunableHandlerFactory<>(ListMultipleTunableHandler.class, ListMultipleSelection.class);
    registerService(bc, fileTHF, StringTunableHandlerFactory.class, new Properties());
    registerService(bc, intTHF, StringTunableHandlerFactory.class, new Properties());
    registerService(bc, doubleTHF, StringTunableHandlerFactory.class, new Properties());
    registerService(bc, floatTHF, StringTunableHandlerFactory.class, new Properties());
    registerService(bc, longTHF, StringTunableHandlerFactory.class, new Properties());
    registerService(bc, booleanTHF, StringTunableHandlerFactory.class, new Properties());
    registerService(bc, stringTHF, StringTunableHandlerFactory.class, new Properties());
    registerService(bc, boundedIntTHF, StringTunableHandlerFactory.class, new Properties());
    registerService(bc, boundedDoubleTHF, StringTunableHandlerFactory.class, new Properties());
    registerService(bc, boundedFloatTHF, StringTunableHandlerFactory.class, new Properties());
    registerService(bc, boundedLongTHF, StringTunableHandlerFactory.class, new Properties());
    registerService(bc, urlTHF, StringTunableHandlerFactory.class, new Properties());
    registerService(bc, listSingleTHF, StringTunableHandlerFactory.class, new Properties());
    registerService(bc, listMultipleTHF, StringTunableHandlerFactory.class, new Properties());
    StringToModel stm = new StringToModelImpl(serviceRegistrar);
    registerService(bc, stm, StringToModel.class, new Properties());
    CyIdentifiableStringTunableHandlerFactory<CyNetworkTunableHandler> networkTHF = new CyIdentifiableStringTunableHandlerFactory<>(stm, CyNetworkTunableHandler.class, CyNetwork.class);
    registerService(bc, networkTHF, StringTunableHandlerFactory.class, new Properties());
    CyIdentifiableStringTunableHandlerFactory<CyNetworkViewTunableHandler> networkViewTHF = new CyIdentifiableStringTunableHandlerFactory<>(stm, CyNetworkViewTunableHandler.class, CyNetworkView.class);
    registerService(bc, networkViewTHF, StringTunableHandlerFactory.class, new Properties());
    CyIdentifiableStringTunableHandlerFactory<CyTableTunableHandler> tableTHF = new CyIdentifiableStringTunableHandlerFactory<>(stm, CyTableTunableHandler.class, CyTable.class);
    registerService(bc, tableTHF, StringTunableHandlerFactory.class, new Properties());
    CyIdentifiableStringTunableHandlerFactory<NodeListTunableHandler> nodeListTHF = new CyIdentifiableStringTunableHandlerFactory<>(stm, NodeListTunableHandler.class, NodeList.class);
    registerService(bc, nodeListTHF, StringTunableHandlerFactory.class, new Properties());
    CyIdentifiableStringTunableHandlerFactory<EdgeListTunableHandler> edgeListTHF = new CyIdentifiableStringTunableHandlerFactory<>(stm, EdgeListTunableHandler.class, EdgeList.class);
    registerService(bc, edgeListTHF, StringTunableHandlerFactory.class, new Properties());
    CyIdentifiableStringTunableHandlerFactory<RowListTunableHandler> rowListTHF = new CyIdentifiableStringTunableHandlerFactory<>(stm, RowListTunableHandler.class, RowList.class);
    registerService(bc, rowListTHF, StringTunableHandlerFactory.class, new Properties());
    BasicArgHandlerFactory argHandlerFactory = new BasicArgHandlerFactory();
    registerService(bc, argHandlerFactory, ArgHandlerFactory.class, new Properties());
    ArgRecorder argRec = new ArgRecorder();
    registerServiceListener(bc, argRec::addTunableHandlerFactory, argRec::removeTunableHandlerFactory, ArgHandlerFactory.class);
    AvailableCommandsImpl availableCommandsImpl = new AvailableCommandsImpl(argRec, serviceRegistrar);
    registerService(bc, availableCommandsImpl, AvailableCommands.class, new Properties());
    registerServiceListener(bc, availableCommandsImpl::addTaskFactory, availableCommandsImpl::removeTaskFactory, TaskFactory.class);
    registerServiceListener(bc, availableCommandsImpl::addNetworkTaskFactory, availableCommandsImpl::removeNetworkTaskFactory, NetworkTaskFactory.class);
    registerServiceListener(bc, availableCommandsImpl::addNetworkViewTaskFactory, availableCommandsImpl::removeNetworkViewTaskFactory, NetworkViewTaskFactory.class);
    registerServiceListener(bc, availableCommandsImpl::addNetworkViewCollectionTaskFactory, availableCommandsImpl::removeNetworkViewCollectionTaskFactory, NetworkViewCollectionTaskFactory.class);
    registerServiceListener(bc, availableCommandsImpl::addTableTaskFactory, availableCommandsImpl::removeTableTaskFactory, TableTaskFactory.class);
    CommandExecutorImpl commandExecutor = new CommandExecutorImpl(interceptor, availableCommandsImpl, serviceRegistrar);
    CommandExecutorTaskFactoryImpl commandExecutorTaskFactory = new CommandExecutorTaskFactoryImpl(commandExecutor, serviceRegistrar);
    Properties commandExecutorTaskFactoryProps = new Properties();
    commandExecutorTaskFactoryProps.setProperty(ID, "commandExecutorTaskFactory");
    registerService(bc, commandExecutorTaskFactory, TaskFactory.class, commandExecutorTaskFactoryProps);
    registerService(bc, commandExecutorTaskFactory, CommandExecutorTaskFactory.class, commandExecutorTaskFactoryProps);
    registerServiceListener(bc, commandExecutor::addTaskFactory, commandExecutor::removeTaskFactory, TaskFactory.class);
    registerServiceListener(bc, commandExecutor::addNetworkTaskFactory, commandExecutor::removeNetworkTaskFactory, NetworkTaskFactory.class);
    registerServiceListener(bc, commandExecutor::addNetworkViewTaskFactory, commandExecutor::removeNetworkViewTaskFactory, NetworkViewTaskFactory.class);
    registerServiceListener(bc, commandExecutor::addNetworkViewCollectionTaskFactory, commandExecutor::removeNetworkViewCollectionTaskFactory, NetworkViewCollectionTaskFactory.class);
    registerServiceListener(bc, commandExecutor::addTableTaskFactory, commandExecutor::removeTableTaskFactory, TableTaskFactory.class);
    registerServiceListener(bc, interceptor::addTunableHandlerFactory, interceptor::removeTunableHandlerFactory, StringTunableHandlerFactory.class);
    {
        Properties props = new Properties();
        props.setProperty(COMMAND, "sleep");
        props.setProperty(COMMAND_NAMESPACE, "command");
        props.setProperty(COMMAND_DESCRIPTION, "Stop command processing for a specified time");
        props.setProperty(COMMAND_LONG_DESCRIPTION, "The **sleep** command will pause processing for a period of time as specified by *duration* seconds.");
        registerService(bc, new SleepCommandTaskFactory(), TaskFactory.class, props);
    }
    {
        Properties props = new Properties();
        props.setProperty(COMMAND, "echo");
        props.setProperty(COMMAND_NAMESPACE, "command");
        props.setProperty(COMMAND_DESCRIPTION, "Returns the value of the 'message' argument.");
        props.setProperty(COMMAND_LONG_DESCRIPTION, "Returns the value of the **message** argument.");
        props.setProperty(COMMAND_SUPPORTS_JSON, "true");
        props.setProperty(COMMAND_EXAMPLE_JSON, "");
        registerService(bc, new EchoCommandTaskFactory(), TaskFactory.class, props);
    }
    {
        Properties props = new Properties();
        props.setProperty(COMMAND, "quit");
        props.setProperty(COMMAND_NAMESPACE, "command");
        props.setProperty(COMMAND_DESCRIPTION, "Exit Cytoscape");
        props.setProperty(COMMAND_LONG_DESCRIPTION, "This command causes Cytoscape to exit. It is typically used at the end of a script file");
        registerService(bc, new QuitTaskFactory(serviceRegistrar), TaskFactory.class, props);
    }
    {
        Properties props = new Properties();
        props.setProperty(PREFERRED_MENU, "Tools");
        props.setProperty(TITLE, "Execute Command File...");
        props.setProperty(COMMAND, "run");
        props.setProperty(COMMAND_NAMESPACE, "command");
        props.setProperty(COMMAND_DESCRIPTION, "Run a series of commands from a file");
        props.setProperty(IN_MENU_BAR, "true");
        props.setProperty(COMMAND_LONG_DESCRIPTION, "The **run** command will execute a command script from the " + "file pointed to by the ``file`` argument, which " + "should contain Cytoscape commands, one per line. " + "Arguments to the " + "script are provided by the *args* argument");
        registerService(bc, new RunCommandsTaskFactory(commandExecutorTaskFactory), TaskFactory.class, props);
    }
    // Get any command line arguments.  The "-S" and "-R" are ours
    AppsFinishedStartingListener scriptRunner = new AppsFinishedStartingListener() {

        public void handleEvent(AppsFinishedStartingEvent event) {
            @SuppressWarnings("unchecked") CyProperty<Properties> commandLineProps = getService(bc, CyProperty.class, "(cyPropertyName=commandline.props)");
            String scriptFile = commandLineProps.getProperties().getProperty("scriptFile");
            if (scriptFile != null) {
                TaskIterator tasks = commandExecutorTaskFactory.createTaskIterator(new File(scriptFile), null);
                SynchronousTaskManager<?> taskManager = serviceRegistrar.getService(SynchronousTaskManager.class);
                taskManager.execute(tasks);
            }
        }
    };
    registerService(bc, scriptRunner, AppsFinishedStartingListener.class, new Properties());
}
Also used : ListSingleTunableHandler(org.cytoscape.command.internal.tunables.ListSingleTunableHandler) BoundedIntTunableHandler(org.cytoscape.command.internal.tunables.BoundedIntTunableHandler) NodeListTunableHandler(org.cytoscape.command.internal.tunables.NodeListTunableHandler) CyTableTunableHandler(org.cytoscape.command.internal.tunables.CyTableTunableHandler) BasicArgHandlerFactory(org.cytoscape.command.internal.available.BasicArgHandlerFactory) BoundedLongTunableHandler(org.cytoscape.command.internal.tunables.BoundedLongTunableHandler) CyServiceRegistrar(org.cytoscape.service.util.CyServiceRegistrar) ArgRecorder(org.cytoscape.command.internal.available.ArgRecorder) BoundedDoubleTunableHandler(org.cytoscape.command.internal.tunables.BoundedDoubleTunableHandler) DoubleTunableHandler(org.cytoscape.command.internal.tunables.DoubleTunableHandler) CommandTunableInterceptorImpl(org.cytoscape.command.internal.tunables.CommandTunableInterceptorImpl) SimpleStringTunableHandlerFactory(org.cytoscape.command.internal.tunables.SimpleStringTunableHandlerFactory) IntTunableHandler(org.cytoscape.command.internal.tunables.IntTunableHandler) BoundedIntTunableHandler(org.cytoscape.command.internal.tunables.BoundedIntTunableHandler) BooleanTunableHandler(org.cytoscape.command.internal.tunables.BooleanTunableHandler) SleepCommandTaskFactory(org.cytoscape.command.internal.tasks.SleepCommandTaskFactory) StringToModel(org.cytoscape.command.StringToModel) ListMultipleTunableHandler(org.cytoscape.command.internal.tunables.ListMultipleTunableHandler) URLTunableHandler(org.cytoscape.command.internal.tunables.URLTunableHandler) QuitTaskFactory(org.cytoscape.command.internal.tasks.QuitTaskFactory) FileTunableHandler(org.cytoscape.command.internal.tunables.FileTunableHandler) RowListTunableHandler(org.cytoscape.command.internal.tunables.RowListTunableHandler) CyIdentifiableStringTunableHandlerFactory(org.cytoscape.command.internal.tunables.CyIdentifiableStringTunableHandlerFactory) File(java.io.File) BoundedFloatTunableHandler(org.cytoscape.command.internal.tunables.BoundedFloatTunableHandler) FloatTunableHandler(org.cytoscape.command.internal.tunables.FloatTunableHandler) ServiceProperties(org.cytoscape.work.ServiceProperties) Properties(java.util.Properties) CyNetworkTunableHandler(org.cytoscape.command.internal.tunables.CyNetworkTunableHandler) AppsFinishedStartingEvent(org.cytoscape.app.event.AppsFinishedStartingEvent) TaskIterator(org.cytoscape.work.TaskIterator) EdgeListTunableHandler(org.cytoscape.command.internal.tunables.EdgeListTunableHandler) BoundedDoubleTunableHandler(org.cytoscape.command.internal.tunables.BoundedDoubleTunableHandler) EchoCommandTaskFactory(org.cytoscape.command.internal.tasks.EchoCommandTaskFactory) BoundedFloatTunableHandler(org.cytoscape.command.internal.tunables.BoundedFloatTunableHandler) AppsFinishedStartingListener(org.cytoscape.app.event.AppsFinishedStartingListener) RunCommandsTaskFactory(org.cytoscape.command.internal.tasks.RunCommandsTaskFactory) StringTunableHandlerImpl(org.cytoscape.command.internal.tunables.StringTunableHandlerImpl) CyNetworkViewTunableHandler(org.cytoscape.command.internal.tunables.CyNetworkViewTunableHandler) BoundedLongTunableHandler(org.cytoscape.command.internal.tunables.BoundedLongTunableHandler) LongTunableHandler(org.cytoscape.command.internal.tunables.LongTunableHandler) NetworkViewCollectionTaskFactory(org.cytoscape.task.NetworkViewCollectionTaskFactory) EchoCommandTaskFactory(org.cytoscape.command.internal.tasks.EchoCommandTaskFactory) RunCommandsTaskFactory(org.cytoscape.command.internal.tasks.RunCommandsTaskFactory) SleepCommandTaskFactory(org.cytoscape.command.internal.tasks.SleepCommandTaskFactory) NetworkViewTaskFactory(org.cytoscape.task.NetworkViewTaskFactory) TaskFactory(org.cytoscape.work.TaskFactory) NetworkTaskFactory(org.cytoscape.task.NetworkTaskFactory) TableTaskFactory(org.cytoscape.task.TableTaskFactory) CommandExecutorTaskFactory(org.cytoscape.command.CommandExecutorTaskFactory) QuitTaskFactory(org.cytoscape.command.internal.tasks.QuitTaskFactory) AvailableCommandsImpl(org.cytoscape.command.internal.available.AvailableCommandsImpl)

Example 2 with CommandExecutorTaskFactory

use of org.cytoscape.command.CommandExecutorTaskFactory in project cytoscape-impl by cytoscape.

the class CommandTaskRunner method runTasks.

private void runTasks(String command, MessageHandler messageHandler) {
    CommandExecutorTaskFactory commandFactory = serviceRegistrar.getService(CommandExecutorTaskFactory.class);
    TaskIterator taskIterator = commandFactory.createTaskIterator(Arrays.asList(command), new TaskObserver() {

        @Override
        public void taskFinished(ObservableTask task) {
            Object result = task.getResults(String.class);
            if (result != null) {
                messageHandler.appendResult(result.toString());
            }
        }

        @Override
        public void allFinished(FinishStatus status) {
            messageHandler.appendCommand(status.getType().toString());
        }
    });
    while (taskIterator.hasNext()) {
        Task task = taskIterator.next();
        try {
            task.run(new TaskMonitor() {

                @Override
                public void showMessage(Level level, String message) {
                    switch(level) {
                        default:
                        case ERROR:
                            messageHandler.appendError(message);
                            break;
                        case INFO:
                            messageHandler.appendMessage(message);
                            break;
                        case WARN:
                            messageHandler.appendWarning(message);
                            break;
                    }
                }

                @Override
                public void setTitle(String title) {
                }

                @Override
                public void setStatusMessage(String statusMessage) {
                }

                @Override
                public void setProgress(double progress) {
                }
            });
        } catch (Exception e) {
            messageHandler.appendError("Error handling command \"" + e.getMessage());
        }
    }
}
Also used : Task(org.cytoscape.work.Task) ObservableTask(org.cytoscape.work.ObservableTask) CommandExecutorTaskFactory(org.cytoscape.command.CommandExecutorTaskFactory) FinishStatus(org.cytoscape.work.FinishStatus) TaskObserver(org.cytoscape.work.TaskObserver) ObservableTask(org.cytoscape.work.ObservableTask) TaskIterator(org.cytoscape.work.TaskIterator) TaskMonitor(org.cytoscape.work.TaskMonitor)

Example 3 with CommandExecutorTaskFactory

use of org.cytoscape.command.CommandExecutorTaskFactory in project cytoscape-impl by cytoscape.

the class ExecuteScriptTask method executeCyCommandFile.

private void executeCyCommandFile() throws Exception {
    final CommandExecutorTaskFactory taskFactory = serviceRegistrar.getService(CommandExecutorTaskFactory.class);
    final TaskIterator cyCommandTasks = taskFactory.createTaskIterator(file, null);
    this.insertTasksAfterCurrentTask(cyCommandTasks);
}
Also used : TaskIterator(org.cytoscape.work.TaskIterator) CommandExecutorTaskFactory(org.cytoscape.command.CommandExecutorTaskFactory)

Example 4 with CommandExecutorTaskFactory

use of org.cytoscape.command.CommandExecutorTaskFactory 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();
}
Also used : CommandExecutorTaskFactory(org.cytoscape.command.CommandExecutorTaskFactory) SynchronousTaskManager(org.cytoscape.work.SynchronousTaskManager) CyVersion(org.cytoscape.application.CyVersion) AvailableCommands(org.cytoscape.command.AvailableCommands) CommandLineArgs(org.cytoscape.cmdline.CommandLineArgs) CyShutdown(org.cytoscape.application.CyShutdown)

Example 5 with CommandExecutorTaskFactory

use of org.cytoscape.command.CommandExecutorTaskFactory in project cytoscape-impl by cytoscape.

the class CyActivator method start.

@Override
public void start(BundleContext bc) {
    CyServiceRegistrar serviceRegistrar = getService(bc, CyServiceRegistrar.class);
    CyApplicationConfiguration cyApplicationConfigurationRef = getService(bc, CyApplicationConfiguration.class);
    CyApplicationManager cyApplicationManagerRef = getService(bc, CyApplicationManager.class);
    CyEventHelper cyEventHelperRef = getService(bc, CyEventHelper.class);
    CyGroupAggregationManager cyGroupAggregationManagerRef = getService(bc, CyGroupAggregationManager.class);
    CyGroupFactory cyGroupFactoryRef = getService(bc, CyGroupFactory.class);
    CyGroupManager cyGroupManagerRef = getService(bc, CyGroupManager.class);
    CyLayoutAlgorithmManager cyLayoutAlgorithmManagerRef = getService(bc, CyLayoutAlgorithmManager.class);
    CyNetworkFactory cyNetworkFactoryRef = getService(bc, CyNetworkFactory.class);
    CyNetworkManager cyNetworkManagerRef = getService(bc, CyNetworkManager.class);
    CyNetworkViewFactory cyNetworkViewFactoryRef = getService(bc, CyNetworkViewFactory.class);
    CyNetworkViewManager cyNetworkViewManagerRef = getService(bc, CyNetworkViewManager.class);
    CyNetworkReaderManager cyNetworkViewReaderManagerRef = getService(bc, CyNetworkReaderManager.class);
    CyNetworkViewWriterManager cyNetworkViewWriterManagerRef = getService(bc, CyNetworkViewWriterManager.class);
    CyProperty<Properties> cyPropertyRef = getService(bc, CyProperty.class, "(cyPropertyName=cytoscape3.props)");
    CyPropertyReaderManager cyPropertyReaderManagerRef = getService(bc, CyPropertyReaderManager.class);
    CyPropertyWriterManager cyPropertyWriterManagerRef = getService(bc, CyPropertyWriterManager.class);
    CyRootNetworkManager cyRootNetworkFactoryRef = getService(bc, CyRootNetworkManager.class);
    CySessionManager cySessionManagerRef = getService(bc, CySessionManager.class);
    CySessionReaderManager cySessionReaderManagerRef = getService(bc, CySessionReaderManager.class);
    CySessionWriterManager cySessionWriterManagerRef = getService(bc, CySessionWriterManager.class);
    CySwingApplication cySwingApplicationRef = getService(bc, CySwingApplication.class);
    CyTableFactory cyTableFactoryRef = getService(bc, CyTableFactory.class);
    CyTableManager cyTableManagerRef = getService(bc, CyTableManager.class);
    CyTableReaderManager cyTableReaderManagerRef = getService(bc, CyTableReaderManager.class);
    CyTableWriterManager cyTableWriterManagerRef = getService(bc, CyTableWriterManager.class);
    PanelTaskManager panelTaskManagerRef = getService(bc, PanelTaskManager.class);
    DialogTaskManager dialogTaskManagerRef = getService(bc, DialogTaskManager.class);
    PresentationWriterManager presentationWriterManagerRef = getService(bc, PresentationWriterManager.class);
    RenderingEngineManager renderingEngineManagerRef = getService(bc, RenderingEngineManager.class);
    TaskManager taskManagerRef = getService(bc, TaskManager.class);
    UndoSupport undoSupportRef = getService(bc, UndoSupport.class);
    TunablePropertySerializerFactory tunablePropertySerializerFactoryRef = getService(bc, TunablePropertySerializerFactory.class);
    VisualMappingManager visualMappingManagerRef = getService(bc, VisualMappingManager.class);
    VisualStyleFactory visualStyleFactoryRef = getService(bc, VisualStyleFactory.class);
    CyVersion cytoscapeVersionService = getService(bc, CyVersion.class);
    CyApplicationConfiguration cyApplicationConfigurationServiceRef = getService(bc, CyApplicationConfiguration.class);
    VisualMappingFunctionFactory vmfFactoryC = getService(bc, VisualMappingFunctionFactory.class, "(mapping.type=continuous)");
    VisualMappingFunctionFactory vmfFactoryD = getService(bc, VisualMappingFunctionFactory.class, "(mapping.type=discrete)");
    VisualMappingFunctionFactory vmfFactoryP = getService(bc, VisualMappingFunctionFactory.class, "(mapping.type=passthrough)");
    DataSourceManager dataSourceManager = getService(bc, DataSourceManager.class);
    // Start of core-task services
    LoadVizmapFileTaskFactory loadVizmapFileTaskFactory = getService(bc, LoadVizmapFileTaskFactory.class);
    LoadNetworkFileTaskFactory loadNetworkFileTaskFactory = getService(bc, LoadNetworkFileTaskFactory.class);
    LoadNetworkURLTaskFactory loadNetworkURLTaskFactory = getService(bc, LoadNetworkURLTaskFactory.class);
    DeleteSelectedNodesAndEdgesTaskFactory deleteSelectedNodesAndEdgesTaskFactory = getService(bc, DeleteSelectedNodesAndEdgesTaskFactory.class);
    SelectAllTaskFactory selectAllTaskFactory = getService(bc, SelectAllTaskFactory.class);
    SelectAllEdgesTaskFactory selectAllEdgesTaskFactory = getService(bc, SelectAllEdgesTaskFactory.class);
    SelectAllNodesTaskFactory selectAllNodesTaskFactory = getService(bc, SelectAllNodesTaskFactory.class);
    SelectAdjacentEdgesTaskFactory selectAdjacentEdgesTaskFactory = getService(bc, SelectAdjacentEdgesTaskFactory.class);
    SelectConnectedNodesTaskFactory selectConnectedNodesTaskFactory = getService(bc, SelectConnectedNodesTaskFactory.class);
    SelectFirstNeighborsTaskFactory selectFirstNeighborsTaskFactory = getService(bc, SelectFirstNeighborsTaskFactory.class, "(title=Undirected)");
    SelectFirstNeighborsTaskFactory selectFirstNeighborsTaskFactoryInEdge = getService(bc, SelectFirstNeighborsTaskFactory.class, "(title=Directed: Incoming)");
    SelectFirstNeighborsTaskFactory selectFirstNeighborsTaskFactoryOutEdge = getService(bc, SelectFirstNeighborsTaskFactory.class, "(title=Directed: Outgoing)");
    DeselectAllTaskFactory deselectAllTaskFactory = getService(bc, DeselectAllTaskFactory.class);
    DeselectAllEdgesTaskFactory deselectAllEdgesTaskFactory = getService(bc, DeselectAllEdgesTaskFactory.class);
    DeselectAllNodesTaskFactory deselectAllNodesTaskFactory = getService(bc, DeselectAllNodesTaskFactory.class);
    InvertSelectedEdgesTaskFactory invertSelectedEdgesTaskFactory = getService(bc, InvertSelectedEdgesTaskFactory.class);
    InvertSelectedNodesTaskFactory invertSelectedNodesTaskFactory = getService(bc, InvertSelectedNodesTaskFactory.class);
    SelectFromFileListTaskFactory selectFromFileListTaskFactory = getService(bc, SelectFromFileListTaskFactory.class);
    SelectFirstNeighborsNodeViewTaskFactory selectFirstNeighborsNodeViewTaskFactory = getService(bc, SelectFirstNeighborsNodeViewTaskFactory.class);
    HideSelectedTaskFactory hideSelectedTaskFactory = getService(bc, HideSelectedTaskFactory.class);
    HideSelectedNodesTaskFactory hideSelectedNodesTaskFactory = getService(bc, HideSelectedNodesTaskFactory.class);
    HideSelectedEdgesTaskFactory hideSelectedEdgesTaskFactory = getService(bc, HideSelectedEdgesTaskFactory.class);
    UnHideAllTaskFactory unHideAllTaskFactory = getService(bc, UnHideAllTaskFactory.class);
    UnHideAllNodesTaskFactory unHideAllNodesTaskFactory = getService(bc, UnHideAllNodesTaskFactory.class);
    UnHideAllEdgesTaskFactory unHideAllEdgesTaskFactory = getService(bc, UnHideAllEdgesTaskFactory.class);
    NewEmptyNetworkViewFactory newEmptyNetworkTaskFactory = getService(bc, NewEmptyNetworkViewFactory.class);
    CloneNetworkTaskFactory cloneNetworkTaskFactory = getService(bc, CloneNetworkTaskFactory.class);
    NewNetworkSelectedNodesAndEdgesTaskFactory newNetworkSelectedNodesEdgesTaskFactory = getService(bc, NewNetworkSelectedNodesAndEdgesTaskFactory.class);
    NewNetworkSelectedNodesOnlyTaskFactory newNetworkSelectedNodesOnlyTaskFactory = getService(bc, NewNetworkSelectedNodesOnlyTaskFactory.class);
    DestroyNetworkTaskFactory destroyNetworkTaskFactory = getService(bc, DestroyNetworkTaskFactory.class);
    DestroyNetworkViewTaskFactory destroyNetworkViewTaskFactory = getService(bc, DestroyNetworkViewTaskFactory.class);
    NewSessionTaskFactory newSessionTaskFactory = getService(bc, NewSessionTaskFactory.class);
    OpenSessionTaskFactory openSessionTaskFactory = getService(bc, OpenSessionTaskFactory.class);
    SaveSessionAsTaskFactory saveSessionAsTaskFactory = getService(bc, SaveSessionAsTaskFactory.class);
    EditNetworkTitleTaskFactory editNetworkTitleTaskFactory = getService(bc, EditNetworkTitleTaskFactory.class);
    CreateNetworkViewTaskFactory createNetworkViewTaskFactory = getService(bc, CreateNetworkViewTaskFactory.class);
    ExportNetworkImageTaskFactory exportNetworkImageTaskFactory = getService(bc, ExportNetworkImageTaskFactory.class);
    ExportNetworkViewTaskFactory exportNetworkViewTaskFactory = getService(bc, ExportNetworkViewTaskFactory.class);
    ExportSelectedTableTaskFactory exportSelectedTableTaskFactory = getService(bc, ExportSelectedTableTaskFactory.class);
    ExportTableTaskFactory exportTableTaskFactory = getService(bc, ExportTableTaskFactory.class);
    ApplyPreferredLayoutTaskFactory applyPreferredLayoutTaskFactory = getService(bc, ApplyPreferredLayoutTaskFactory.class);
    DeleteColumnTaskFactory deleteColumnTaskFactory = getService(bc, DeleteColumnTaskFactory.class);
    RenameColumnTaskFactory renameColumnTaskFactory = getService(bc, RenameColumnTaskFactory.class);
    DeleteTableTaskFactory deleteTableTaskFactory = getService(bc, DeleteTableTaskFactory.class);
    ExportVizmapTaskFactory exportVizmapTaskFactory = getService(bc, ExportVizmapTaskFactory.class);
    ConnectSelectedNodesTaskFactory connectSelectedNodesTaskFactory = getService(bc, ConnectSelectedNodesTaskFactory.class);
    MapGlobalToLocalTableTaskFactory mapGlobal = getService(bc, MapGlobalToLocalTableTaskFactory.class);
    ApplyVisualStyleTaskFactory applyVisualStyleTaskFactory = getService(bc, ApplyVisualStyleTaskFactory.class);
    MapTableToNetworkTablesTaskFactory mapNetworkAttrTaskFactory = getService(bc, MapTableToNetworkTablesTaskFactory.class);
    GroupNodesTaskFactory groupNodesTaskFactory = getService(bc, GroupNodesTaskFactory.class);
    UnGroupTaskFactory unGroupTaskFactory = getService(bc, UnGroupTaskFactory.class);
    CollapseGroupTaskFactory collapseGroupTaskFactory = getService(bc, CollapseGroupTaskFactory.class);
    ExpandGroupTaskFactory expandGroupTaskFactory = getService(bc, ExpandGroupTaskFactory.class);
    UnGroupNodesTaskFactory unGroupNodesTaskFactory = getService(bc, UnGroupNodesTaskFactory.class);
    // End of core-task services
    // Command execution services
    CommandExecutorTaskFactory cyCommandExecutorTaskFactory = getService(bc, CommandExecutorTaskFactory.class);
    AvailableCommands availableCommands = getService(bc, AvailableCommands.class);
    StreamUtil streamUtilServiceRef = getService(bc, StreamUtil.class);
    FileUtil fileUtilServiceRef = getService(bc, FileUtil.class);
    CySwingAppAdapter cyAppAdapter = new CyAppAdapterImpl(cyApplicationConfigurationRef, cyApplicationManagerRef, cyEventHelperRef, cyGroupAggregationManagerRef, cyGroupFactoryRef, cyGroupManagerRef, cyLayoutAlgorithmManagerRef, cyNetworkFactoryRef, cyNetworkManagerRef, cyNetworkViewFactoryRef, cyNetworkViewManagerRef, cyNetworkViewReaderManagerRef, cyNetworkViewWriterManagerRef, cyPropertyRef, cyPropertyReaderManagerRef, cyPropertyWriterManagerRef, cyRootNetworkFactoryRef, serviceRegistrar, cySessionManagerRef, cySessionReaderManagerRef, cySessionWriterManagerRef, cySwingApplicationRef, cyTableFactoryRef, cyTableManagerRef, cyTableReaderManagerRef, cyTableWriterManagerRef, cytoscapeVersionService, dialogTaskManagerRef, panelTaskManagerRef, presentationWriterManagerRef, renderingEngineManagerRef, taskManagerRef, undoSupportRef, tunablePropertySerializerFactoryRef, vmfFactoryC, vmfFactoryD, vmfFactoryP, visualMappingManagerRef, visualStyleFactoryRef, dataSourceManager, // from core-task-api
    loadVizmapFileTaskFactory, loadNetworkFileTaskFactory, loadNetworkURLTaskFactory, deleteSelectedNodesAndEdgesTaskFactory, selectAllTaskFactory, selectAllEdgesTaskFactory, selectAllNodesTaskFactory, selectAdjacentEdgesTaskFactory, selectConnectedNodesTaskFactory, selectFirstNeighborsTaskFactory, selectFirstNeighborsTaskFactoryInEdge, selectFirstNeighborsTaskFactoryOutEdge, deselectAllTaskFactory, deselectAllEdgesTaskFactory, deselectAllNodesTaskFactory, invertSelectedEdgesTaskFactory, invertSelectedNodesTaskFactory, selectFromFileListTaskFactory, selectFirstNeighborsNodeViewTaskFactory, hideSelectedTaskFactory, hideSelectedNodesTaskFactory, hideSelectedEdgesTaskFactory, unHideAllTaskFactory, unHideAllNodesTaskFactory, unHideAllEdgesTaskFactory, newEmptyNetworkTaskFactory, cloneNetworkTaskFactory, newNetworkSelectedNodesEdgesTaskFactory, newNetworkSelectedNodesOnlyTaskFactory, destroyNetworkTaskFactory, destroyNetworkViewTaskFactory, newSessionTaskFactory, openSessionTaskFactory, saveSessionAsTaskFactory, editNetworkTitleTaskFactory, createNetworkViewTaskFactory, exportNetworkImageTaskFactory, exportNetworkViewTaskFactory, exportSelectedTableTaskFactory, exportTableTaskFactory, applyPreferredLayoutTaskFactory, deleteColumnTaskFactory, renameColumnTaskFactory, deleteTableTaskFactory, exportVizmapTaskFactory, connectSelectedNodesTaskFactory, mapGlobal, applyVisualStyleTaskFactory, mapNetworkAttrTaskFactory, groupNodesTaskFactory, unGroupTaskFactory, collapseGroupTaskFactory, expandGroupTaskFactory, unGroupNodesTaskFactory, cyCommandExecutorTaskFactory, availableCommands);
    registerService(bc, cyAppAdapter, CyAppAdapter.class);
    registerService(bc, cyAppAdapter, CySwingAppAdapter.class);
    WebQuerier webQuerier = new WebQuerier(streamUtilServiceRef, cytoscapeVersionService);
    registerService(bc, webQuerier, WebQuerier.class);
    StartLevel startLevel = getService(bc, StartLevel.class);
    // Instantiate new manager
    final AppManager appManager = new AppManager(cyAppAdapter, cyApplicationConfigurationServiceRef, cytoscapeVersionService, cyEventHelperRef, webQuerier, startLevel, bc);
    registerService(bc, appManager, AppManager.class);
    bc.addFrameworkListener(appManager);
    final DownloadSitesManager downloadSitesManager = new DownloadSitesManager(cyPropertyRef);
    final UpdateManager updateManager = new UpdateManager(appManager, downloadSitesManager);
    registerService(bc, updateManager, AppsFinishedStartingListener.class);
    final AppConflictHandlerFactory appConflictHandlerFactory = new AppConflictHandlerFactory();
    registerService(bc, appConflictHandlerFactory, GUITunableHandlerFactory.class);
    // AbstractCyAction implementation for updated app manager
    AppManagerAction appManagerAction = new AppManagerAction(appManager, downloadSitesManager, updateManager, cySwingApplicationRef, fileUtilServiceRef, dialogTaskManagerRef, serviceRegistrar);
    registerService(bc, appManagerAction, CyAction.class);
    // Show citations dialog
    final CitationsAction citationsAction = new CitationsAction(webQuerier, appManager, serviceRegistrar);
    registerService(bc, citationsAction, CyAction.class);
    // Start local server that reports app installation status to the app store when requested,
    // also able to install an app when told by the app store
    final AppGetResponder appGetResponder = new AppGetResponder(appManager, cytoscapeVersionService);
    final CyHttpd httpd = (new CyHttpdFactoryImpl()).createHttpd(new LocalhostServerSocketFactory(2607));
    httpd.addBeforeResponse(new ScreenOriginsBeforeResponse(WebQuerier.DEFAULT_APP_STORE_URL));
    httpd.addBeforeResponse(new OriginOptionsBeforeResponse("x-csrftoken"));
    httpd.addAfterResponse(new AddAllowOriginHeader());
    httpd.addResponder(appGetResponder.new StatusResponder());
    httpd.addResponder(appGetResponder.new InstallResponder());
    httpd.start();
    // Special case: handle yFiles app options
    final OpenBrowser openBrowser = getService(bc, OpenBrowser.class);
    YFilesChecker checker = new YFilesChecker(appManager, serviceRegistrar, openBrowser);
    bc.addBundleListener(checker);
    registerAllServices(bc, checker, new Properties());
    {
        AppStoreTaskFactory factory = new AppStoreTaskFactory(appManager, serviceRegistrar);
        Properties props = new Properties();
        props.setProperty(COMMAND_NAMESPACE, "apps");
        props.setProperty(COMMAND, "open appstore");
        props.setProperty(COMMAND_DESCRIPTION, "Open the app store page for an app");
        props.setProperty(COMMAND_LONG_DESCRIPTION, "Open the app store page for an app.");
        props.setProperty(COMMAND_SUPPORTS_JSON, "true");
        props.setProperty(COMMAND_EXAMPLE_JSON, "{}");
        registerService(bc, factory, TaskFactory.class, props);
    }
    {
        DisableTaskFactory factory = new DisableTaskFactory(appManager);
        Properties props = new Properties();
        props.setProperty(COMMAND_NAMESPACE, "apps");
        props.setProperty(COMMAND, "disable");
        props.setProperty(COMMAND_DESCRIPTION, "Disable an app");
        props.setProperty(COMMAND_LONG_DESCRIPTION, "Disable a currently installed app.");
        props.setProperty(COMMAND_SUPPORTS_JSON, "true");
        props.setProperty(COMMAND_EXAMPLE_JSON, "{\"appName\": \"appname\"}");
        registerService(bc, factory, TaskFactory.class, props);
    }
    {
        EnableTaskFactory factory = new EnableTaskFactory(appManager);
        Properties props = new Properties();
        props.setProperty(COMMAND_NAMESPACE, "apps");
        props.setProperty(COMMAND, "enable");
        props.setProperty(COMMAND_DESCRIPTION, "Enable a disabled app");
        props.setProperty(COMMAND_LONG_DESCRIPTION, "Enable a currently disabled app.");
        props.setProperty(COMMAND_SUPPORTS_JSON, "true");
        props.setProperty(COMMAND_EXAMPLE_JSON, "{\"appName\": \"appname\"}");
        registerService(bc, factory, TaskFactory.class, props);
    }
    {
        InformationTaskFactory factory = new InformationTaskFactory(appManager);
        Properties props = new Properties();
        props.setProperty(COMMAND_NAMESPACE, "apps");
        props.setProperty(COMMAND, "information");
        props.setProperty(COMMAND_DESCRIPTION, "Get app information");
        props.setProperty(COMMAND_LONG_DESCRIPTION, "Get information about an app.");
        props.setProperty(COMMAND_SUPPORTS_JSON, "true");
        props.setProperty(COMMAND_EXAMPLE_JSON, "{\"appName\": \"appname\"" + ", \"description\": \"App description\"" + ", \"version\": \"1.2.2\"}");
        registerService(bc, factory, TaskFactory.class, props);
    }
    {
        InstallTaskFactory factory = new InstallTaskFactory(appManager);
        Properties props = new Properties();
        props.setProperty(COMMAND_NAMESPACE, "apps");
        props.setProperty(COMMAND, "install");
        props.setProperty(COMMAND_DESCRIPTION, "Install an app");
        props.setProperty(COMMAND_LONG_DESCRIPTION, "Install an app given an app name or file.");
        props.setProperty(COMMAND_SUPPORTS_JSON, "true");
        props.setProperty(COMMAND_EXAMPLE_JSON, "{}");
        registerService(bc, factory, TaskFactory.class, props);
    }
    {
        ListAvailableTaskFactory factory = new ListAvailableTaskFactory(appManager);
        Properties props = new Properties();
        props.setProperty(COMMAND_NAMESPACE, "apps");
        props.setProperty(COMMAND, "list available");
        props.setProperty(COMMAND_DESCRIPTION, "List the available apps");
        props.setProperty(COMMAND_LONG_DESCRIPTION, "Return a list of the available apps in the app store");
        props.setProperty(COMMAND_SUPPORTS_JSON, "true");
        props.setProperty(COMMAND_EXAMPLE_JSON, "[{\"appName\":\"name\", " + "\"description\":\"descriptions\", " + "\"details\":\"app details\"}]");
        registerService(bc, factory, TaskFactory.class, props);
    }
    {
        ListAppsTaskFactory factory = new ListAppsTaskFactory(appManager, AppStatus.DISABLED);
        Properties props = new Properties();
        props.setProperty(COMMAND_NAMESPACE, "apps");
        props.setProperty(COMMAND, "list disabled");
        props.setProperty(COMMAND_DESCRIPTION, "List the disabled apps");
        props.setProperty(COMMAND_LONG_DESCRIPTION, "Return a list of the disabled apps in the current installation.");
        props.setProperty(COMMAND_SUPPORTS_JSON, "true");
        props.setProperty(COMMAND_EXAMPLE_JSON, "[{ \"appName\": \"appname\"," + "\"version\": \"1.1.0\"," + "\"description\": \"descriptions\"," + "\"status\": \"Disabled\"}]");
        registerService(bc, factory, TaskFactory.class, props);
    }
    {
        ListAppsTaskFactory factory = new ListAppsTaskFactory(appManager, AppStatus.INSTALLED);
        Properties props = new Properties();
        props.setProperty(COMMAND_NAMESPACE, "apps");
        props.setProperty(COMMAND, "list installed");
        props.setProperty(COMMAND_DESCRIPTION, "List the installed apps");
        props.setProperty(COMMAND_LONG_DESCRIPTION, "Return a list of the installed apps in the current installation.");
        props.setProperty(COMMAND_SUPPORTS_JSON, "true");
        props.setProperty(COMMAND_EXAMPLE_JSON, "[{\"appName\": \"appname\"," + "\"version\": \"1.1.0\"," + "\"description\": \"descriptions\"," + "\"status\": \"Installed\"}]");
        registerService(bc, factory, TaskFactory.class, props);
    }
    {
        ListAppsTaskFactory factory = new ListAppsTaskFactory(appManager, AppStatus.UNINSTALLED);
        Properties props = new Properties();
        props.setProperty(COMMAND_NAMESPACE, "apps");
        props.setProperty(COMMAND, "list uninstalled");
        props.setProperty(COMMAND_DESCRIPTION, "List the uninstalled apps");
        props.setProperty(COMMAND_LONG_DESCRIPTION, "Return a list of the uninstalled apps in the current installation.");
        props.setProperty(COMMAND_SUPPORTS_JSON, "true");
        props.setProperty(COMMAND_EXAMPLE_JSON, "[{ \"appName\": \"appname\"," + "\"version\": \"1.1.0\"," + "\"description\": \"descriptions\"," + "\"status\": \"Uninstalled\"}]");
        registerService(bc, factory, TaskFactory.class, props);
    }
    {
        ListUpdatesTaskFactory factory = new ListUpdatesTaskFactory(appManager);
        Properties props = new Properties();
        props.setProperty(COMMAND_NAMESPACE, "apps");
        props.setProperty(COMMAND, "list updates");
        props.setProperty(COMMAND_DESCRIPTION, "List the apps available for updates");
        props.setProperty(COMMAND_LONG_DESCRIPTION, "Return a list of the apps that have updates in the app store.");
        props.setProperty(COMMAND_SUPPORTS_JSON, "true");
        props.setProperty(COMMAND_EXAMPLE_JSON, "[{ \"appName\": \"appname\"," + "\"version\": \"1.1.10\"," + "\"information\": \"app information\"}]");
        registerService(bc, factory, TaskFactory.class, props);
    }
    {
        StatusTaskFactory factory = new StatusTaskFactory(appManager);
        Properties props = new Properties();
        props.setProperty(COMMAND_NAMESPACE, "apps");
        props.setProperty(COMMAND, "status");
        props.setProperty(COMMAND_DESCRIPTION, "Get the status of an app");
        props.setProperty(COMMAND_LONG_DESCRIPTION, "Get the status of an app.");
        props.setProperty(COMMAND_SUPPORTS_JSON, "true");
        props.setProperty(COMMAND_EXAMPLE_JSON, "{\"appName\": \"appname\", \"status\": \"Installed\"}");
        registerService(bc, factory, TaskFactory.class, props);
    }
    {
        UninstallTaskFactory factory = new UninstallTaskFactory(appManager);
        Properties props = new Properties();
        props.setProperty(COMMAND_NAMESPACE, "apps");
        props.setProperty(COMMAND, "uninstall");
        props.setProperty(COMMAND_DESCRIPTION, "Uninstall an app");
        props.setProperty(COMMAND_LONG_DESCRIPTION, "Uninstall a currently installed app.");
        props.setProperty(COMMAND_SUPPORTS_JSON, "true");
        props.setProperty(COMMAND_EXAMPLE_JSON, "{\"appName\": \"appname\"}");
        registerService(bc, factory, TaskFactory.class, props);
    }
    {
        UpdateTaskFactory factory = new UpdateTaskFactory(appManager, updateManager);
        Properties props = new Properties();
        props.setProperty(COMMAND_NAMESPACE, "apps");
        props.setProperty(COMMAND, "update");
        props.setProperty(COMMAND_DESCRIPTION, "Update an app or all apps");
        props.setProperty(COMMAND_LONG_DESCRIPTION, "Update an app or all apps.");
        props.setProperty(COMMAND_SUPPORTS_JSON, "true");
        props.setProperty(COMMAND_EXAMPLE_JSON, "{}");
        registerService(bc, factory, TaskFactory.class, props);
    }
}
Also used : CyEventHelper(org.cytoscape.event.CyEventHelper) ExportVizmapTaskFactory(org.cytoscape.task.write.ExportVizmapTaskFactory) StatusTaskFactory(org.cytoscape.app.internal.task.StatusTaskFactory) EditNetworkTitleTaskFactory(org.cytoscape.task.edit.EditNetworkTitleTaskFactory) VisualStyleFactory(org.cytoscape.view.vizmap.VisualStyleFactory) ConnectSelectedNodesTaskFactory(org.cytoscape.task.edit.ConnectSelectedNodesTaskFactory) CyHttpd(org.cytoscape.app.internal.net.server.CyHttpd) NewEmptyNetworkViewFactory(org.cytoscape.task.create.NewEmptyNetworkViewFactory) ExportNetworkViewTaskFactory(org.cytoscape.task.write.ExportNetworkViewTaskFactory) LocalhostServerSocketFactory(org.cytoscape.app.internal.net.server.LocalhostServerSocketFactory) CyPropertyWriterManager(org.cytoscape.io.write.CyPropertyWriterManager) SelectAllEdgesTaskFactory(org.cytoscape.task.select.SelectAllEdgesTaskFactory) CyRootNetworkManager(org.cytoscape.model.subnetwork.CyRootNetworkManager) ExportNetworkImageTaskFactory(org.cytoscape.task.write.ExportNetworkImageTaskFactory) SelectAllNodesTaskFactory(org.cytoscape.task.select.SelectAllNodesTaskFactory) RenderingEngineManager(org.cytoscape.view.presentation.RenderingEngineManager) ExportSelectedTableTaskFactory(org.cytoscape.task.write.ExportSelectedTableTaskFactory) LoadNetworkURLTaskFactory(org.cytoscape.task.read.LoadNetworkURLTaskFactory) DeselectAllTaskFactory(org.cytoscape.task.select.DeselectAllTaskFactory) InformationTaskFactory(org.cytoscape.app.internal.task.InformationTaskFactory) CyNetworkViewFactory(org.cytoscape.view.model.CyNetworkViewFactory) DeselectAllNodesTaskFactory(org.cytoscape.task.select.DeselectAllNodesTaskFactory) CyPropertyReaderManager(org.cytoscape.io.read.CyPropertyReaderManager) CyNetworkViewWriterManager(org.cytoscape.io.write.CyNetworkViewWriterManager) UnGroupNodesTaskFactory(org.cytoscape.task.edit.UnGroupNodesTaskFactory) GroupNodesTaskFactory(org.cytoscape.task.edit.GroupNodesTaskFactory) CommandExecutorTaskFactory(org.cytoscape.command.CommandExecutorTaskFactory) UnHideAllTaskFactory(org.cytoscape.task.hide.UnHideAllTaskFactory) DialogTaskManager(org.cytoscape.work.swing.DialogTaskManager) CyApplicationConfiguration(org.cytoscape.application.CyApplicationConfiguration) ExpandGroupTaskFactory(org.cytoscape.task.edit.ExpandGroupTaskFactory) UpdateTaskFactory(org.cytoscape.app.internal.task.UpdateTaskFactory) SelectFirstNeighborsTaskFactory(org.cytoscape.task.select.SelectFirstNeighborsTaskFactory) MapTableToNetworkTablesTaskFactory(org.cytoscape.task.edit.MapTableToNetworkTablesTaskFactory) StreamUtil(org.cytoscape.io.util.StreamUtil) MapGlobalToLocalTableTaskFactory(org.cytoscape.task.edit.MapGlobalToLocalTableTaskFactory) LoadNetworkFileTaskFactory(org.cytoscape.task.read.LoadNetworkFileTaskFactory) UnHideAllNodesTaskFactory(org.cytoscape.task.hide.UnHideAllNodesTaskFactory) CyGroupManager(org.cytoscape.group.CyGroupManager) CreateNetworkViewTaskFactory(org.cytoscape.task.create.CreateNetworkViewTaskFactory) DestroyNetworkTaskFactory(org.cytoscape.task.destroy.DestroyNetworkTaskFactory) SelectFromFileListTaskFactory(org.cytoscape.task.select.SelectFromFileListTaskFactory) UnGroupNodesTaskFactory(org.cytoscape.task.edit.UnGroupNodesTaskFactory) OriginOptionsBeforeResponse(org.cytoscape.app.internal.net.server.OriginOptionsBeforeResponse) CySessionWriterManager(org.cytoscape.io.write.CySessionWriterManager) CySwingAppAdapter(org.cytoscape.app.swing.CySwingAppAdapter) UninstallTaskFactory(org.cytoscape.app.internal.task.UninstallTaskFactory) CyTableManager(org.cytoscape.model.CyTableManager) ApplyVisualStyleTaskFactory(org.cytoscape.task.visualize.ApplyVisualStyleTaskFactory) ScreenOriginsBeforeResponse(org.cytoscape.app.internal.net.server.ScreenOriginsBeforeResponse) ExportTableTaskFactory(org.cytoscape.task.write.ExportTableTaskFactory) ApplyPreferredLayoutTaskFactory(org.cytoscape.task.visualize.ApplyPreferredLayoutTaskFactory) AppManager(org.cytoscape.app.internal.manager.AppManager) InformationTaskFactory(org.cytoscape.app.internal.task.InformationTaskFactory) UnHideAllEdgesTaskFactory(org.cytoscape.task.hide.UnHideAllEdgesTaskFactory) ListUpdatesTaskFactory(org.cytoscape.app.internal.task.ListUpdatesTaskFactory) ListAvailableTaskFactory(org.cytoscape.app.internal.task.ListAvailableTaskFactory) ConnectSelectedNodesTaskFactory(org.cytoscape.task.edit.ConnectSelectedNodesTaskFactory) RenameColumnTaskFactory(org.cytoscape.task.edit.RenameColumnTaskFactory) AppStoreTaskFactory(org.cytoscape.app.internal.task.AppStoreTaskFactory) NewNetworkSelectedNodesAndEdgesTaskFactory(org.cytoscape.task.create.NewNetworkSelectedNodesAndEdgesTaskFactory) InvertSelectedNodesTaskFactory(org.cytoscape.task.select.InvertSelectedNodesTaskFactory) HideSelectedNodesTaskFactory(org.cytoscape.task.hide.HideSelectedNodesTaskFactory) DeselectAllTaskFactory(org.cytoscape.task.select.DeselectAllTaskFactory) UpdateTaskFactory(org.cytoscape.app.internal.task.UpdateTaskFactory) UnHideAllNodesTaskFactory(org.cytoscape.task.hide.UnHideAllNodesTaskFactory) ListAppsTaskFactory(org.cytoscape.app.internal.task.ListAppsTaskFactory) ExpandGroupTaskFactory(org.cytoscape.task.edit.ExpandGroupTaskFactory) SelectAllTaskFactory(org.cytoscape.task.select.SelectAllTaskFactory) ExportSelectedTableTaskFactory(org.cytoscape.task.write.ExportSelectedTableTaskFactory) SelectAdjacentEdgesTaskFactory(org.cytoscape.task.select.SelectAdjacentEdgesTaskFactory) CreateNetworkViewTaskFactory(org.cytoscape.task.create.CreateNetworkViewTaskFactory) SelectAllNodesTaskFactory(org.cytoscape.task.select.SelectAllNodesTaskFactory) ExportNetworkViewTaskFactory(org.cytoscape.task.write.ExportNetworkViewTaskFactory) LoadVizmapFileTaskFactory(org.cytoscape.task.read.LoadVizmapFileTaskFactory) SaveSessionAsTaskFactory(org.cytoscape.task.write.SaveSessionAsTaskFactory) SelectFromFileListTaskFactory(org.cytoscape.task.select.SelectFromFileListTaskFactory) ExportTableTaskFactory(org.cytoscape.task.write.ExportTableTaskFactory) InstallTaskFactory(org.cytoscape.app.internal.task.InstallTaskFactory) InvertSelectedEdgesTaskFactory(org.cytoscape.task.select.InvertSelectedEdgesTaskFactory) ApplyPreferredLayoutTaskFactory(org.cytoscape.task.visualize.ApplyPreferredLayoutTaskFactory) ApplyVisualStyleTaskFactory(org.cytoscape.task.visualize.ApplyVisualStyleTaskFactory) EditNetworkTitleTaskFactory(org.cytoscape.task.edit.EditNetworkTitleTaskFactory) DeleteSelectedNodesAndEdgesTaskFactory(org.cytoscape.task.destroy.DeleteSelectedNodesAndEdgesTaskFactory) NewNetworkSelectedNodesOnlyTaskFactory(org.cytoscape.task.create.NewNetworkSelectedNodesOnlyTaskFactory) UninstallTaskFactory(org.cytoscape.app.internal.task.UninstallTaskFactory) UnHideAllTaskFactory(org.cytoscape.task.hide.UnHideAllTaskFactory) LoadNetworkURLTaskFactory(org.cytoscape.task.read.LoadNetworkURLTaskFactory) UnGroupNodesTaskFactory(org.cytoscape.task.edit.UnGroupNodesTaskFactory) DestroyNetworkTaskFactory(org.cytoscape.task.destroy.DestroyNetworkTaskFactory) DeselectAllEdgesTaskFactory(org.cytoscape.task.select.DeselectAllEdgesTaskFactory) SelectAllEdgesTaskFactory(org.cytoscape.task.select.SelectAllEdgesTaskFactory) SelectFirstNeighborsTaskFactory(org.cytoscape.task.select.SelectFirstNeighborsTaskFactory) SelectConnectedNodesTaskFactory(org.cytoscape.task.select.SelectConnectedNodesTaskFactory) MapGlobalToLocalTableTaskFactory(org.cytoscape.task.edit.MapGlobalToLocalTableTaskFactory) GroupNodesTaskFactory(org.cytoscape.task.edit.GroupNodesTaskFactory) CloneNetworkTaskFactory(org.cytoscape.task.create.CloneNetworkTaskFactory) MapTableToNetworkTablesTaskFactory(org.cytoscape.task.edit.MapTableToNetworkTablesTaskFactory) DeleteTableTaskFactory(org.cytoscape.task.destroy.DeleteTableTaskFactory) DeselectAllNodesTaskFactory(org.cytoscape.task.select.DeselectAllNodesTaskFactory) DisableTaskFactory(org.cytoscape.app.internal.task.DisableTaskFactory) EnableTaskFactory(org.cytoscape.app.internal.task.EnableTaskFactory) HideSelectedEdgesTaskFactory(org.cytoscape.task.hide.HideSelectedEdgesTaskFactory) SelectFirstNeighborsNodeViewTaskFactory(org.cytoscape.task.select.SelectFirstNeighborsNodeViewTaskFactory) StatusTaskFactory(org.cytoscape.app.internal.task.StatusTaskFactory) TaskFactory(org.cytoscape.work.TaskFactory) CollapseGroupTaskFactory(org.cytoscape.task.edit.CollapseGroupTaskFactory) DestroyNetworkViewTaskFactory(org.cytoscape.task.destroy.DestroyNetworkViewTaskFactory) ExportNetworkImageTaskFactory(org.cytoscape.task.write.ExportNetworkImageTaskFactory) DeleteColumnTaskFactory(org.cytoscape.task.destroy.DeleteColumnTaskFactory) NewSessionTaskFactory(org.cytoscape.task.create.NewSessionTaskFactory) CommandExecutorTaskFactory(org.cytoscape.command.CommandExecutorTaskFactory) UnGroupTaskFactory(org.cytoscape.task.edit.UnGroupTaskFactory) LoadNetworkFileTaskFactory(org.cytoscape.task.read.LoadNetworkFileTaskFactory) HideSelectedTaskFactory(org.cytoscape.task.hide.HideSelectedTaskFactory) ExportVizmapTaskFactory(org.cytoscape.task.write.ExportVizmapTaskFactory) OpenSessionTaskFactory(org.cytoscape.task.read.OpenSessionTaskFactory) CloneNetworkTaskFactory(org.cytoscape.task.create.CloneNetworkTaskFactory) SaveSessionAsTaskFactory(org.cytoscape.task.write.SaveSessionAsTaskFactory) PanelTaskManager(org.cytoscape.work.swing.PanelTaskManager) VisualMappingFunctionFactory(org.cytoscape.view.vizmap.VisualMappingFunctionFactory) UnHideAllEdgesTaskFactory(org.cytoscape.task.hide.UnHideAllEdgesTaskFactory) InvertSelectedNodesTaskFactory(org.cytoscape.task.select.InvertSelectedNodesTaskFactory) ListAvailableTaskFactory(org.cytoscape.app.internal.task.ListAvailableTaskFactory) HideSelectedNodesTaskFactory(org.cytoscape.task.hide.HideSelectedNodesTaskFactory) DataSourceManager(org.cytoscape.io.datasource.DataSourceManager) CyServiceRegistrar(org.cytoscape.service.util.CyServiceRegistrar) SelectConnectedNodesTaskFactory(org.cytoscape.task.select.SelectConnectedNodesTaskFactory) SelectFirstNeighborsNodeViewTaskFactory(org.cytoscape.task.select.SelectFirstNeighborsNodeViewTaskFactory) AppGetResponder(org.cytoscape.app.internal.net.server.AppGetResponder) StartLevel(org.osgi.service.startlevel.StartLevel) AppManagerAction(org.cytoscape.app.internal.action.AppManagerAction) EnableTaskFactory(org.cytoscape.app.internal.task.EnableTaskFactory) DeleteTableTaskFactory(org.cytoscape.task.destroy.DeleteTableTaskFactory) CyGroupFactory(org.cytoscape.group.CyGroupFactory) AddAllowOriginHeader(org.cytoscape.app.internal.net.server.AddAllowOriginHeader) CollapseGroupTaskFactory(org.cytoscape.task.edit.CollapseGroupTaskFactory) CyHttpdFactoryImpl(org.cytoscape.app.internal.net.server.CyHttpdFactoryImpl) TunablePropertySerializerFactory(org.cytoscape.work.properties.TunablePropertySerializerFactory) CyNetworkViewManager(org.cytoscape.view.model.CyNetworkViewManager) CySwingApplication(org.cytoscape.application.swing.CySwingApplication) UnGroupTaskFactory(org.cytoscape.task.edit.UnGroupTaskFactory) PresentationWriterManager(org.cytoscape.io.write.PresentationWriterManager) CyNetworkReaderManager(org.cytoscape.io.read.CyNetworkReaderManager) DeleteSelectedNodesAndEdgesTaskFactory(org.cytoscape.task.destroy.DeleteSelectedNodesAndEdgesTaskFactory) DownloadSitesManager(org.cytoscape.app.internal.ui.downloadsites.DownloadSitesManager) UndoSupport(org.cytoscape.work.undo.UndoSupport) CyApplicationManager(org.cytoscape.application.CyApplicationManager) CyNetworkManager(org.cytoscape.model.CyNetworkManager) AppConflictHandlerFactory(org.cytoscape.app.internal.tunable.AppConflictHandlerFactory) CyLayoutAlgorithmManager(org.cytoscape.view.layout.CyLayoutAlgorithmManager) DeleteColumnTaskFactory(org.cytoscape.task.destroy.DeleteColumnTaskFactory) NewNetworkSelectedNodesAndEdgesTaskFactory(org.cytoscape.task.create.NewNetworkSelectedNodesAndEdgesTaskFactory) UpdateManager(org.cytoscape.app.internal.net.UpdateManager) CyNetworkFactory(org.cytoscape.model.CyNetworkFactory) RenameColumnTaskFactory(org.cytoscape.task.edit.RenameColumnTaskFactory) FileUtil(org.cytoscape.util.swing.FileUtil) CyTableReaderManager(org.cytoscape.io.read.CyTableReaderManager) CyTableWriterManager(org.cytoscape.io.write.CyTableWriterManager) DestroyNetworkViewTaskFactory(org.cytoscape.task.destroy.DestroyNetworkViewTaskFactory) Properties(java.util.Properties) LoadVizmapFileTaskFactory(org.cytoscape.task.read.LoadVizmapFileTaskFactory) AppStoreTaskFactory(org.cytoscape.app.internal.task.AppStoreTaskFactory) AvailableCommands(org.cytoscape.command.AvailableCommands) CyGroupAggregationManager(org.cytoscape.group.data.CyGroupAggregationManager) InvertSelectedEdgesTaskFactory(org.cytoscape.task.select.InvertSelectedEdgesTaskFactory) NewNetworkSelectedNodesOnlyTaskFactory(org.cytoscape.task.create.NewNetworkSelectedNodesOnlyTaskFactory) ListAppsTaskFactory(org.cytoscape.app.internal.task.ListAppsTaskFactory) SelectAllTaskFactory(org.cytoscape.task.select.SelectAllTaskFactory) HideSelectedTaskFactory(org.cytoscape.task.hide.HideSelectedTaskFactory) CitationsAction(org.cytoscape.app.internal.action.CitationsAction) InstallTaskFactory(org.cytoscape.app.internal.task.InstallTaskFactory) SelectAdjacentEdgesTaskFactory(org.cytoscape.task.select.SelectAdjacentEdgesTaskFactory) NewSessionTaskFactory(org.cytoscape.task.create.NewSessionTaskFactory) DisableTaskFactory(org.cytoscape.app.internal.task.DisableTaskFactory) CyVersion(org.cytoscape.application.CyVersion) HideSelectedEdgesTaskFactory(org.cytoscape.task.hide.HideSelectedEdgesTaskFactory) DeselectAllEdgesTaskFactory(org.cytoscape.task.select.DeselectAllEdgesTaskFactory) ListUpdatesTaskFactory(org.cytoscape.app.internal.task.ListUpdatesTaskFactory) CySessionReaderManager(org.cytoscape.io.read.CySessionReaderManager) CyTableFactory(org.cytoscape.model.CyTableFactory) TaskManager(org.cytoscape.work.TaskManager) PanelTaskManager(org.cytoscape.work.swing.PanelTaskManager) DialogTaskManager(org.cytoscape.work.swing.DialogTaskManager) OpenBrowser(org.cytoscape.util.swing.OpenBrowser) CySessionManager(org.cytoscape.session.CySessionManager) VisualMappingManager(org.cytoscape.view.vizmap.VisualMappingManager) OpenSessionTaskFactory(org.cytoscape.task.read.OpenSessionTaskFactory) WebQuerier(org.cytoscape.app.internal.net.WebQuerier)

Aggregations

CommandExecutorTaskFactory (org.cytoscape.command.CommandExecutorTaskFactory)7 TaskIterator (org.cytoscape.work.TaskIterator)4 Properties (java.util.Properties)2 CyVersion (org.cytoscape.application.CyVersion)2 AvailableCommands (org.cytoscape.command.AvailableCommands)2 OpenBrowser (org.cytoscape.util.swing.OpenBrowser)2 SynchronousTaskManager (org.cytoscape.work.SynchronousTaskManager)2 File (java.io.File)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 AppsFinishedStartingEvent (org.cytoscape.app.event.AppsFinishedStartingEvent)1 AppsFinishedStartingListener (org.cytoscape.app.event.AppsFinishedStartingListener)1 AppManagerAction (org.cytoscape.app.internal.action.AppManagerAction)1 CitationsAction (org.cytoscape.app.internal.action.CitationsAction)1 App (org.cytoscape.app.internal.manager.App)1 AppManager (org.cytoscape.app.internal.manager.AppManager)1 UpdateManager (org.cytoscape.app.internal.net.UpdateManager)1 WebApp (org.cytoscape.app.internal.net.WebApp)1 WebQuerier (org.cytoscape.app.internal.net.WebQuerier)1 AddAllowOriginHeader (org.cytoscape.app.internal.net.server.AddAllowOriginHeader)1