public override void InitializePlugin(IPoderosaWorld poderosa) {
            base.InitializePlugin(poderosa);
            _instance = this;

            IPluginManager pm = poderosa.PluginManager;
            _coreServices = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));
            _terminalEmulatorPlugin = (ITerminalEmulatorService)pm.FindPlugin("org.poderosa.terminalemulator", typeof(ITerminalEmulatorService));
            Debug.Assert(_terminalEmulatorPlugin != null);

            TerminalUICommand.Register(_coreServices.CommandManager);

            TerminalUIMenuGroup uimenu = new TerminalUIMenuGroup();
            LogMenuGroup logmenu = new LogMenuGroup();
            //Console Menu
            IExtensionPoint consolemenu = pm.FindExtensionPoint("org.poderosa.menu.console");
            consolemenu.RegisterExtension(uimenu);
            consolemenu.RegisterExtension(logmenu);
            IExtensionPoint contextmenu = pm.FindExtensionPoint("org.poderosa.terminalemulator.contextMenu");
            contextmenu.RegisterExtension(uimenu);
            contextmenu.RegisterExtension(logmenu);
            IExtensionPoint documentContextMenu = pm.FindExtensionPoint("org.poderosa.terminalemulator.documentContextMenu");
            documentContextMenu.RegisterExtension(uimenu);
            documentContextMenu.RegisterExtension(logmenu);

            IExtensionPoint toolmenu = pm.FindExtensionPoint("org.poderosa.menu.tool");
            toolmenu.RegisterExtension(new ShellSchemeEditMenuGroup());
        }
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);
            _instance = this;

            IPluginManager pm = poderosa.PluginManager;

            _coreServices           = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));
            _terminalEmulatorPlugin = (ITerminalEmulatorService)pm.FindPlugin("org.poderosa.terminalemulator", typeof(ITerminalEmulatorService));
            Debug.Assert(_terminalEmulatorPlugin != null);

            TerminalUICommand.Register(_coreServices.CommandManager);

            TerminalUIMenuGroup uimenu  = new TerminalUIMenuGroup();
            LogMenuGroup        logmenu = new LogMenuGroup();
            //Console Menu
            IExtensionPoint consolemenu = pm.FindExtensionPoint("org.poderosa.menu.console");

            consolemenu.RegisterExtension(uimenu);
            consolemenu.RegisterExtension(logmenu);
            IExtensionPoint contextmenu = pm.FindExtensionPoint("org.poderosa.terminalemulator.contextMenu");

            contextmenu.RegisterExtension(uimenu);
            contextmenu.RegisterExtension(logmenu);
            IExtensionPoint documentContextMenu = pm.FindExtensionPoint("org.poderosa.terminalemulator.documentContextMenu");

            documentContextMenu.RegisterExtension(uimenu);
            documentContextMenu.RegisterExtension(logmenu);

            IExtensionPoint toolmenu = pm.FindExtensionPoint("org.poderosa.menu.tool");

            toolmenu.RegisterExtension(new ShellSchemeEditMenuGroup());
        }