Inheritance: ICommandHandler
Beispiel #1
0
        public IEnumerable<ICommandHandler> GetDefaultHandlers()
        {
            var handlers = new List<ICommandHandler>();
            var configHandler = new ConfigurationHandler(_settings.RootPath, PluginLocator(), EventDispatcher);
            var environment
                = new EnvironmentService(
                    _settings.DefaultLanguage,
                    _settings.EnabledLanguages,
                    PluginLocator,
                    ICodeEngineLocator(),
                    ILocateEditorEngine());
            handlers.AddRange(
                new ICommandHandler[]
                {
                    new InitHandler(configHandler),
                    new ProfileHandler(configHandler, EventDispatcher),

                    configHandler,

                    new EditorHandler(_settings.RootPath, ILocateEditorEngine(), environment, dispatchMessage),
                    new TouchHandler(dispatchMessage),
                    new HandleScriptHandler(_settings.RootPath, dispatchMessage, PluginLocator),
                    new HandleReactiveScriptHandler(_settings.RootPath, dispatchMessage, PluginLocator, ICodeEngineLocator()),
                    new HandleSnippetHandler(_settings.RootPath, dispatchMessage, ICodeEngineLocator()),
                    new HandleLanguageHandler(_settings.RootPath, dispatchMessage, PluginLocator),

                    new CodeModelQueryHandler(ICodeEngineLocator(), ILocateEditorEngine()),

                    new ProcessStartHandler(),

                    new EventListener(_settings.RootPath),
                    new OutputListener(_settings.RootPath, dispatchMessage, ICodeEngineLocator()),

                    new PackageHandler(_settings.RootPath, _settings.SourcePrioritization, dispatchMessage, PluginLocator),

                    new EnvironmentHandler(_settings.RootPath, dispatchMessage, ICodeEngineLocator(), ILocateEditorEngine(), environment),
                    new ShutdownHandler(_settings.RootPath, dispatchMessage, environment),

                    new GetCommandsHandler(),

                    new RunCommandHandler(),

                    new HelpHandler()
                });
            return handlers;
        }
Beispiel #2
0
 public ProfileHandler(ConfigurationHandler configHandler, Action <string> eventDispatcher)
 {
     _configHandler   = configHandler;
     _eventDispatcher = eventDispatcher;
 }
Beispiel #3
0
 public InitHandler(ConfigurationHandler configHandler)
 {
     _configHandler = configHandler;
 }
 public ProfileHandler(ConfigurationHandler configHandler, Action<string> eventDispatcher)
 {
     _configHandler = configHandler;
     _eventDispatcher = eventDispatcher;
 }
Beispiel #5
0
 public InitHandler(ConfigurationHandler configHandler)
 {
     _configHandler = configHandler;
 }