Example #1
0
 private void RegisterTerminalParameterSerializers(IExtensionPoint extp)
 {
     extp.RegisterExtension(new TelnetParameterSerializer());
     extp.RegisterExtension(new SSHParameterSerializer());
     extp.RegisterExtension(new SSHSubsystemParameterSerializer());
     extp.RegisterExtension(new LocalShellParameterSerializer());
 }
Example #2
0
        //ExtP作成とデフォルトの登録
        public static void CreateExtensionPointAndDefaultCommands(IPluginManager pm)
        {
            IExtensionPoint pt = pm.CreateExtensionPoint(POPUP_MENU_EXTENSION_POINT, typeof(ICommandResultProcessorMenuItem), TerminalEmulatorPlugin.Instance);

            pt.RegisterExtension(new PopupCommandResult());
            pt.RegisterExtension(new CopyCommandResult());
        }
Example #3
0
        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());
        }
Example #4
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="poderosa">an instance of PoderosaWorld</param>
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);

            _instance      = this;
            _poderosaWorld = poderosa;

            _adapterManager = poderosa.AdapterManager;
            _coreServices   = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));

            _stringResource = new StringResource("Poderosa.Pipe.strings", typeof(PipePlugin).Assembly);
            poderosa.Culture.AddChangeListener(_stringResource);

            _terminalSessionsService = poderosa.PluginManager.FindPlugin("org.poderosa.terminalsessions", typeof(ITerminalSessionsService)) as ITerminalSessionsService;
            _terminalEmulatorService = poderosa.PluginManager.FindPlugin("org.poderosa.terminalemulator", typeof(ITerminalEmulatorService)) as ITerminalEmulatorService;
            _serializeService        = poderosa.PluginManager.FindPlugin("org.poderosa.core.serializing", typeof(ISerializeService)) as ISerializeService;

            IExtensionPoint extSer = _coreServices.SerializerExtensionPoint;

            extSer.RegisterExtension(new PipeTerminalParameterSerializer());
            extSer.RegisterExtension(new PipeTerminalSettingsSerializer());

            _openPipeCommand = new OpenPipeCommand();

            IPluginManager pm = poderosa.PluginManager;

            pm.FindExtensionPoint("org.poderosa.menu.file").RegisterExtension(new PipeMenuGroup(_openPipeCommand));

            // Toolbar button has not been added yet
            //pm.FindExtensionPoint("org.poderosa.core.window.toolbar").RegisterExtension(new PipeToolBarComponent());

            pm.FindExtensionPoint("org.poderosa.termianlsessions.terminalConnectionFactory").RegisterExtension(new PipeConnectionFactory());
        }
Example #5
0
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);
            _group1 = new MenuGroup1();
            _group2 = new MenuGroup2();
            IExtensionPoint ep = poderosa.PluginManager.FindExtensionPoint("org.poderosa.menu.file");

            ep.RegisterExtension(_group1);
            ep.RegisterExtension(_group2);
            _instance = this;
        }
Example #6
0
        public static void Register(IPluginManager pm, ICommandManager cm)
        {
            StringResource     sr      = TEnv.Strings;
            ICommandCategory   filecat = cm.CommandCategories.File;
            GeneralCommandImpl open    = new GeneralCommandImpl("org.poderosa.sessions.openShortcutFile", sr, "Command.OpenShortcutFile", filecat, new ExecuteDelegate(OpenShortcutFile));
            GeneralCommandImpl save    = new GeneralCommandImpl("org.poderosa.sessions.saveShortcutFile", sr, "Command.SaveShortcutFile", filecat, new ExecuteDelegate(SaveShortcutFile),
                                                                delegate(ICommandTarget target) {
                return(TerminalCommandTarget.AsTerminal(target) != null);
            });

            cm.Register(open);
            cm.Register(save);

            IExtensionPoint filemenu = pm.FindExtensionPoint("org.poderosa.menu.file");

            filemenu.RegisterExtension(new PoderosaMenuGroupImpl(new IPoderosaMenu[] {
                new PoderosaMenuItemImpl(open, sr, "Menu.OpenShortcutFile"),
                new PoderosaMenuItemImpl(save, sr, "Menu.SaveShortcutFile")
            }).SetPosition(PositionType.NextTo, CygwinPlugin.Instance.CygwinMenuGroupTemp));

            ShortcutFileToolBarComponent tb = new ShortcutFileToolBarComponent(open, save);

            pm.FindExtensionPoint("org.poderosa.core.window.toolbar").RegisterExtension(tb);
            TerminalSessionsPlugin.Instance.SessionManager.AddActiveDocumentChangeListener(tb);
        }
Example #7
0
        /// <summary>
        /// <ja>初期化</ja>
        /// </summary>
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);
            _instance = this;

            // 文字列リソース読み込み
            _stringResource = new StringResource("Poderosa.ExtendPaste.strings", typeof(ExtendPastePlugin).Assembly);
            ExtendPastePlugin.Instance.PoderosaWorld.Culture.AddChangeListener(_stringResource);

            // コマンド登録
            IPluginManager  pm       = poderosa.PluginManager;
            IExtensionPoint extp_cmd = pm.FindExtensionPoint("org.poderosa.terminalsessions.pasteCommand");

            extp_cmd.RegisterExtension(new ExtendPasteCommand());

            // オプションパネル登録
            IExtensionPoint extp_opt = pm.FindExtensionPoint("org.poderosa.optionpanel");

            extp_opt.RegisterExtension(new ExtendPastePanelExtension());

            // オプションクラス登録
            _optionSupplier = new ExtendPasteOptionsSupplier();
            _coreServices   = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));
            _coreServices.PreferenceExtensionPoint.RegisterExtension(_optionSupplier);
        }
Example #8
0
 public override void InitializePlugin(IPoderosaWorld poderosa) {
     base.InitializePlugin(poderosa);
     _serviceElements = poderosa.PluginManager.CreateExtensionPoint(EXTENSIONPOINT_NAME, typeof(ISerializeServiceElement), this);
     //_typeToElement = new TypedHashtable<Type, ISerializeServiceElement>();
     //RenderProfileはこのアセンブリなので登録してしまう
     _serviceElements.RegisterExtension(new RenderProfileSerializer());
 }
Example #9
0
 public override void InitializePlugin(IPoderosaWorld poderosa)
 {
     base.InitializePlugin(poderosa);
     _serviceElements = poderosa.PluginManager.CreateExtensionPoint(EXTENSIONPOINT_NAME, typeof(ISerializeServiceElement), this);
     //_typeToElement = new TypedHashtable<Type, ISerializeServiceElement>();
     //RenderProfileはこのアセンブリなので登録してしまう
     _serviceElements.RegisterExtension(new RenderProfileSerializer());
 }
Example #10
0
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);
            _group1 = new MenuGroup1();
            _group2 = new MenuGroup2();
            IExtensionPoint ep = poderosa.PluginManager.FindExtensionPoint("org.poderosa.menu.file");

            ep.RegisterExtension(_group1);
            ep.RegisterExtension(_group2);
            _instance = this;

            foreach (IViewManagerFactory mf in
                     poderosa.PluginManager.FindExtensionPoint(WindowManagerConstants.MAINWINDOWCONTENT_ID).GetExtensions())
            {
                mf.DefaultViewFactory = new ViewFactoryForTest();
            }
        }
Example #11
0
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);
            _instance = this;

            _stringResource = new StringResource("Poderosa.SerialPort.strings", typeof(SerialPortPlugin).Assembly);
            poderosa.Culture.AddChangeListener(_stringResource);
            IPluginManager pm = poderosa.PluginManager;

            _coreServices = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));

            IExtensionPoint pt = _coreServices.SerializerExtensionPoint;

            pt.RegisterExtension(new SerialTerminalParamSerializer());
            pt.RegisterExtension(new SerialTerminalSettingsSerializer());

            _openSerialPortCommand = new OpenSerialPortCommand();
            _coreServices.CommandManager.Register(_openSerialPortCommand);

            pm.FindExtensionPoint("org.poderosa.menu.file").RegisterExtension(new SerialPortMenuGroup());
            pm.FindExtensionPoint("org.poderosa.core.window.toolbar").RegisterExtension(new SerialPortToolBarComponent());
            pm.FindExtensionPoint("org.poderosa.termianlsessions.terminalConnectionFactory").RegisterExtension(new SerialConnectionFactory());
        }
Example #12
0
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);
            _instance = this;

            IPluginManager pm = poderosa.PluginManager;

            _coreServices = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));
            TEnv.ReloadStringResource();
            _terminalViewFactory = new TerminalViewFactory();
            pm.FindExtensionPoint(WindowManagerConstants.VIEW_FACTORY_ID).RegisterExtension(_terminalViewFactory);
            //このViewFactoryはデフォ
            foreach (IViewManagerFactory mf in pm.FindExtensionPoint(WindowManagerConstants.MAINWINDOWCONTENT_ID).GetExtensions())
            {
                mf.DefaultViewFactory = _terminalViewFactory;
            }

            //ログインダイアログのサポート用
            pm.CreateExtensionPoint("org.poderosa.terminalsessions.telnetSSHLoginDialogInitializer", typeof(ITelnetSSHLoginDialogInitializer), this);
            pm.CreateExtensionPoint("org.poderosa.terminalsessions.loginDialogUISupport", typeof(ILoginDialogUISupport), this);
            pm.CreateExtensionPoint("org.poderosa.terminalsessions.terminalParameterStore", typeof(ITerminalSessionParameterStore), this);
            IExtensionPoint factory_point = pm.CreateExtensionPoint(TERMINAL_CONNECTION_FACTORY_ID, typeof(ITerminalConnectionFactory), this);

            _pasteCommandExt = pm.CreateExtensionPoint("org.poderosa.terminalsessions.pasteCommand", typeof(IPoderosaCommand), this);

            _terminalSessionsOptionSupplier = new TerminalSessionOptionsSupplier();
            _coreServices.PreferenceExtensionPoint.RegisterExtension(_terminalSessionsOptionSupplier);


            //Add conversion for TerminalPane
            _paneBridgeAdapter = new PaneBridgeAdapter();
            poderosa.AdapterManager.RegisterFactory(_paneBridgeAdapter);

            _startCommand     = new StartCommand(factory_point);
            _reproduceCommand = new ReproduceCommand();
            _coreServices.CommandManager.Register(_reproduceCommand);

            ReproduceMenuGroup rmg         = new ReproduceMenuGroup();
            IExtensionPoint    consolemenu = pm.FindExtensionPoint("org.poderosa.menu.console");

            consolemenu.RegisterExtension(rmg);

            IExtensionPoint contextmenu = pm.FindExtensionPoint("org.poderosa.terminalemulator.contextMenu");

            contextmenu.RegisterExtension(rmg);

            IExtensionPoint documentContext = pm.FindExtensionPoint("org.poderosa.terminalemulator.documentContextMenu");

            documentContext.RegisterExtension(rmg);
        }
Example #13
0
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);
            _instance = this;
            IExtensionPoint ep = poderosa.PluginManager.FindExtensionPoint("org.poderosa.menu.file");

            ep.RegisterExtension(new DummySessionMenuGroup());

            ICoreServices cs = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));

            poderosa.PluginManager.FindExtensionPoint(WindowManagerConstants.VIEWFORMATEVENTHANDLER_ID).RegisterExtension(this);
            poderosa.PluginManager.FindExtensionPoint("org.poderosa.core.sessions.docViewRelationHandler").RegisterExtension(this);
            poderosa.PluginManager.FindExtensionPoint(WindowManagerConstants.VIEW_FACTORY_ID).RegisterExtension(this);
        }
Example #14
0
        public override void InitializePlugin(IPoderosaWorld poderosa) {
            base.InitializePlugin(poderosa);
            _instance = this;
            _stringResource = new StringResource("Poderosa.XZModem.strings", typeof(XZModemPlugin).Assembly);
            poderosa.Culture.AddChangeListener(_stringResource);

            IPluginManager pm = poderosa.PluginManager;
            _coreServices = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));
            _terminalEmulatorService = (ITerminalEmulatorService)pm.FindPlugin("org.poderosa.terminalemulator", typeof(ITerminalEmulatorService));

            _startXZModemCommand = new StartXZModemCommand();
            _coreServices.CommandManager.Register(_startXZModemCommand);

            IExtensionPoint consolemenu = pm.FindExtensionPoint(TerminalEmulatorConstants.TERMINALSPECIAL_EXTENSIONPOINT);
            consolemenu.RegisterExtension(new XZModemMenuGroup());

        }
Example #15
0
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);
            _instance = this;
            _strings  = new StringResource("Poderosa.PortForwardingCommand.strings", typeof(PortForwardingCommandPlugin).Assembly);
            poderosa.Culture.AddChangeListener(_strings);

            IPluginManager pm = poderosa.PluginManager;

            _coreServices = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));

            _execPortForwardingCommand = new ExecPortForwardingCommand();
            _coreServices.CommandManager.Register(_execPortForwardingCommand);
            IExtensionPoint toolmenu = pm.FindExtensionPoint("org.poderosa.menu.tool");

            toolmenu.RegisterExtension(new PoderosaMenuGroupImpl(
                                           new IPoderosaMenu[] { new PoderosaMenuItemImpl(_execPortForwardingCommand, _strings, "Menu.PortForwarding") }, false));
        }
Example #16
0
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);
            _instance = this;

            IPluginManager pm = poderosa.PluginManager;

            _commandManager     = (ICommandManager)pm.FindPlugin("org.poderosa.core.commands", typeof(ICommandManager));
            _loginDialogCommand = new CygwinLoginDialogCommand();
            _commandManager.Register(_loginDialogCommand);

            IExtensionPoint ep = poderosa.PluginManager.FindExtensionPoint("org.poderosa.menu.file");

            _cygwinMenuGroup = new CygwinMenuGroup();
            ep.RegisterExtension(_cygwinMenuGroup);

            _cygwinToolBarComponent = new CygwinToolBarComponent();
            poderosa.PluginManager.FindExtensionPoint("org.poderosa.core.window.toolbar").RegisterExtension(_cygwinToolBarComponent);
        }
Example #17
0
        /// <summary>
        /// コンストラクタ
        /// </summary>
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);
            _instance = this;

            // 文字列リソース読み込み
            _stringResource = new Poderosa.StringResource("Contrib.BroadcastCommand.strings", typeof(BroadcastCommandPlugin).Assembly);
            BroadcastCommandPlugin.Instance.PoderosaWorld.Culture.AddChangeListener(_stringResource);

            // メニュー登録
            IPluginManager pm = poderosa.PluginManager;

            _coreServices            = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));
            _broadcastCommandCommand = new BroadcastCommandCommand();
            _coreServices.CommandManager.Register(_broadcastCommandCommand);
            IExtensionPoint toolmenu = pm.FindExtensionPoint("org.poderosa.menu.tool");

            toolmenu.RegisterExtension(new PoderosaMenuGroupImpl(new IPoderosaMenu[] { new PoderosaMenuItemImpl(_broadcastCommandCommand, BroadcastCommandPlugin.Strings, "Menu.BroadcastCommand") }, false));
        }
Example #18
0
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);
            _instance = this;

            IPluginManager pm = poderosa.PluginManager;
            ICoreServices  cs = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));

            _commandManager = cs.CommandManager;
            Debug.Assert(_commandManager != null);
            SSHUtilCommand.Register(_commandManager);

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

            toolmenu.RegisterExtension(sshmenu);

            _keyAgent = new KeyAgent();
            cs.PreferenceExtensionPoint.RegisterExtension(_keyAgent);
            pm.FindExtensionPoint(ProtocolsPluginConstants.RESULTEVENTHANDLER_EXTENSION).RegisterExtension(_keyAgent);
        }
Example #19
0
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);

#if USING_GENERIC_COMMAND
            //"ダイアログ"コマンドカテゴリを取得
            ICoreServices    cs     = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));
            ICommandCategory dialog = cs.CommandManager.CommandCategories.Dialogs;

            //コマンド作成
            GeneralCommandImpl cmd = new GeneralCommandImpl("org.poderosa.helloworld", "Hello World Command", dialog, delegate(ICommandTarget target) {
                //コマンドの実装
                //このコマンドはメインメニューから起動するので、CommandTargetからウィンドウが取得できるはず
                IPoderosaMainWindow window = (IPoderosaMainWindow)target.GetAdapter(typeof(IPoderosaMainWindow));
                Debug.Assert(window != null);
                MessageBox.Show(window.AsForm(), "Hello World", "HelloWorld Plugin");
                return(CommandResult.Succeeded);
            });
            //コマンドマネージャへの登録
            cs.CommandManager.Register(cmd);

            //ヘルプメニューに登録
            IExtensionPoint helpmenu = poderosa.PluginManager.FindExtensionPoint("org.poderosa.menu.help");
            helpmenu.RegisterExtension(new PoderosaMenuGroupImpl(new PoderosaMenuItemImpl("org.poderosa.helloworld", "Hello World")));
#else //単なるIPoderosaCommand版
            //コマンド作成
            PoderosaCommandImpl cmd = new PoderosaCommandImpl(delegate(ICommandTarget target) {
                //コマンドの実装
                //このコマンドはメインメニューから起動するので、CommandTargetからウィンドウが取得できるはず
                IPoderosaMainWindow window = (IPoderosaMainWindow)target.GetAdapter(typeof(IPoderosaMainWindow));
                Debug.Assert(window != null);
                MessageBox.Show(window.AsForm(), "Hello World", "HelloWorld Plugin");
                return(CommandResult.Succeeded);
            });

            //ヘルプメニューに登録
            IExtensionPoint helpmenu = poderosa.PluginManager.FindExtensionPoint("org.poderosa.menu.help");
            helpmenu.RegisterExtension(new PoderosaMenuGroupImpl(new PoderosaMenuItemImpl(cmd, "Hello World")));
#endif
        }
Example #20
0
        /// <summary>
        /// コンストラクタ
        /// </summary>
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);
            _instance = this;

            // 文字列リソース読み込み
            _stringResource = new Poderosa.StringResource("Contrib.ConnectProfile.strings", typeof(ConnectProfilePlugin).Assembly);
            ConnectProfilePlugin.Instance.PoderosaWorld.Culture.AddChangeListener(_stringResource);

            // コマンド登録
            IPluginManager pm = poderosa.PluginManager;

            _coreServices           = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));
            _terminalEmulatorPlugin = (ITerminalEmulatorService)pm.FindPlugin("org.poderosa.terminalemulator", typeof(ITerminalEmulatorService));
            ConnectProfileCommand.Register(_coreServices.CommandManager);

            // メニューリスト作成
            ConnectProfileMenuGroup        menulist        = new ConnectProfileMenuGroup();
            ConnectProfileContextMenuGroup contextmenulist = new ConnectProfileContextMenuGroup();

            // メニュー登録
            IExtensionPoint toolmenu = pm.FindExtensionPoint("org.poderosa.menu.tool");

            toolmenu.RegisterExtension(menulist);

            // コンテキストメニュー登録
            IExtensionPoint contextmenu = pm.FindExtensionPoint("org.poderosa.terminalemulator.contextMenu");

            contextmenu.RegisterExtension(contextmenulist);

            // 設定ファイル連携
            _connectProfileOptionSupplier = new ConnectProfileOptionsSupplier();
            _coreServices.PreferenceExtensionPoint.RegisterExtension(_connectProfileOptionSupplier);

            // 接続プロファイル
            _profiles = new ConnectProfileList();
        }
Example #21
0
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);

            _instance       = this;
            _stringResource = new StringResource("Poderosa.Usability.strings", typeof(OptionDialogPlugin).Assembly);
            poderosa.Culture.AddChangeListener(this);
            IPluginManager pm = poderosa.PluginManager;

            _coreServices = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));

            IExtensionPoint panel_ext = pm.CreateExtensionPoint(OPTION_PANEL_ID, typeof(IOptionPanelExtension), this);

            ICommandCategory dialogs = _coreServices.CommandManager.CommandCategories.Dialogs;

            _optionDialogCommand       = new GeneralCommandImpl("org.poderosa.optiondialog.open", _stringResource, "Command.OptionDialog", dialogs, new ExecuteDelegate(OptionDialogCommand.OpenOptionDialog)).SetDefaultShortcutKey(Keys.Alt | Keys.Control | Keys.T);
            _detailedPreferenceCommand = new GeneralCommandImpl("org.poderosa.preferenceeditor.open", _stringResource, "Command.PreferenceEditor", dialogs, new ExecuteDelegate(OptionDialogCommand.OpenPreferenceEditor));

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

            _optionDialogMenuGroup = new PoderosaMenuGroupImpl(new IPoderosaMenuItem[] {
                new PoderosaMenuItemImpl(_optionDialogCommand, _stringResource, "Menu.OptionDialog"),
                new PoderosaMenuItemImpl(_detailedPreferenceCommand, _stringResource, "Menu.PreferenceEditor")
            }).SetPosition(PositionType.Last, null);

            toolmenu.RegisterExtension(_optionDialogMenuGroup);

            //基本のオプションパネルを登録
            panel_ext.RegisterExtension(new DisplayOptionPanelExtension());
            panel_ext.RegisterExtension(new TerminalOptionPanelExtension());
            panel_ext.RegisterExtension(new PeripheralOptionPanelExtension());
            panel_ext.RegisterExtension(new CommandOptionPanelExtension());
            panel_ext.RegisterExtension(new SSHOptionPanelExtension());
            panel_ext.RegisterExtension(new ConnectionOptionPanelExtension());
            panel_ext.RegisterExtension(new GenericOptionPanelExtension());
        }
Example #22
0
        internal static void DefineExtensionPoint(IPluginManager pm)
        {
            IExtensionPoint pt = pm.CreateExtensionPoint("org.poderosa.window.aboutbox", typeof(IPoderosaAboutBoxFactory), WindowManagerPlugin.Instance);

            pt.RegisterExtension(new DefaultAboutBoxFactory());
        }
Example #23
0
 public StartCommand(IExtensionPoint pt) {
     pt.RegisterExtension(new CygwinConnectionFactory());
     pt.RegisterExtension(new SSHConnectionFactory());
     pt.RegisterExtension(new TelnetConnectionFactory());
 }
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);
            _instance = this;
            _optionSupplier = new TerminalOptionsSupplier();
            _keepAlive = new KeepAlive();
            _customKeySettings = new CustomKeySettings();
            _shellSchemeCollection = new ShellSchemeCollection();

            GEnv.Init();
            IPluginManager pm = poderosa.PluginManager;
            ICoreServices cs = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));
            Debug.Assert(cs != null);
            cs.PreferenceExtensionPoint.RegisterExtension(_optionSupplier);
            cs.PreferenceExtensionPoint.RegisterExtension(_shellSchemeCollection);
            _coreServices = cs;

            //Serialize Service
            cs.SerializerExtensionPoint.RegisterExtension(new TerminalSettingsSerializer(pm));

            _commandManager = cs.CommandManager;
            TerminalCommand.Register(_commandManager);
            TerminalSettingMenuGroup.Initialize();

            //PromptChecker
            _promptCheckerWithTimer = new PromptCheckerWithTimer();

            //Edit Menuに追加
            IExtensionPoint editmenu = pm.FindExtensionPoint("org.poderosa.menu.edit");
            editmenu.RegisterExtension(new AdvancedCopyPasteMenuGroup());
            editmenu.RegisterExtension(new TerminalBufferMenuGroup());
            editmenu.RegisterExtension(new SelectionMenuGroup());

            //Console Menu : これは処置に困るところだが!
            IExtensionPoint consolemenu = pm.FindExtensionPoint("org.poderosa.menu.console");
            consolemenu.RegisterExtension(new TerminalSettingMenuGroup());
            consolemenu.RegisterExtension(new IntelliSenseMenuGroup());

            //Context Menu
            _contextMenu = pm.CreateExtensionPoint(TerminalEmulatorConstants.TERMINAL_CONTEXT_MENU_EXTENSIONPOINT, typeof(IPoderosaMenuGroup), this);
            _contextMenu.RegisterExtension(new BasicCopyPasteMenuGroup());
            _contextMenu.RegisterExtension(new TerminalSettingMenuGroup());
            _contextMenu.RegisterExtension(new IntelliSenseMenuGroup());

            //タブのコンテキストメニュー
            _documentContextMenu = pm.CreateExtensionPoint(TerminalEmulatorConstants.DOCUMENT_CONTEXT_MENU_EXTENSIONPOINT, typeof(IPoderosaMenuGroup), this);
            _documentContextMenu.RegisterExtension(new PoderosaMenuGroupImpl(new PoderosaMenuItemImpl(
                cs.CommandManager.Find("org.poderosa.core.session.closedocument"), GEnv.Strings, "Menu.DocumentClose")));

            //ToolBar
            IExtensionPoint toolbar = pm.FindExtensionPoint("org.poderosa.core.window.toolbar");
            TerminalToolBar terminaltoolbar = new TerminalToolBar();
            toolbar.RegisterExtension(terminaltoolbar);
            GetSessionManager().AddActiveDocumentChangeListener(terminaltoolbar);

            //その他 Extension
            _intelliSenseExtension = pm.CreateExtensionPoint(TerminalEmulatorConstants.INTELLISENSE_CANDIDATE_EXTENSIONPOINT, typeof(IIntelliSenseCandidateExtension), this);
            _autoLogFileFormatter = pm.CreateExtensionPoint(TerminalEmulatorConstants.LOG_FILENAME_FORMATTER_EXTENSIONPOINT, typeof(IAutoLogFileFormatter), this);
            _dynamicCaptionFormatter = pm.CreateExtensionPoint(TerminalEmulatorConstants.DYNAMIC_CAPTION_FORMATTER_EXTENSIONPOINT, typeof(IDynamicCaptionFormatter), this);

            //Command Popup
            CommandResultSession.Init(poderosa);
            PopupStyleCommandResultRecognizer.CreateExtensionPointAndDefaultCommands(pm);

            // Preferences for PromptRecognizer
            cs.PreferenceExtensionPoint.RegisterExtension(PromptRecognizerPreferences.Instance);

            // Preferences for XTerm
            cs.PreferenceExtensionPoint.RegisterExtension(XTermPreferences.Instance);
        }
Example #25
0
        public override void InitializePlugin(IPoderosaWorld poderosa)
        {
            base.InitializePlugin(poderosa);
            _instance              = this;
            _optionSupplier        = new TerminalOptionsSupplier();
            _keepAlive             = new KeepAlive();
            _customKeySettings     = new CustomKeySettings();
            _shellSchemeCollection = new ShellSchemeCollection();

            GEnv.Init();
            IPluginManager pm = poderosa.PluginManager;
            ICoreServices  cs = (ICoreServices)poderosa.GetAdapter(typeof(ICoreServices));

            Debug.Assert(cs != null);
            cs.PreferenceExtensionPoint.RegisterExtension(_optionSupplier);
            cs.PreferenceExtensionPoint.RegisterExtension(_shellSchemeCollection);
            _coreServices = cs;

            //Serialize Service
            cs.SerializerExtensionPoint.RegisterExtension(new TerminalSettingsSerializer(pm));

            _commandManager = cs.CommandManager;
            TerminalCommand.Register(_commandManager);
            TerminalSettingMenuGroup.Initialize();

            //PromptChecker
            _promptCheckerWithTimer = new PromptCheckerWithTimer();

            //Edit Menuに追加
            IExtensionPoint editmenu = pm.FindExtensionPoint("org.poderosa.menu.edit");

            editmenu.RegisterExtension(new AdvancedCopyPasteMenuGroup());
            editmenu.RegisterExtension(new TerminalBufferMenuGroup());
            editmenu.RegisterExtension(new SelectionMenuGroup());

            //Console Menu : これは処置に困るところだが!
            IExtensionPoint consolemenu = pm.FindExtensionPoint("org.poderosa.menu.console");

            consolemenu.RegisterExtension(new TerminalSettingMenuGroup());
            consolemenu.RegisterExtension(new IntelliSenseMenuGroup());

            //Context Menu
            _contextMenu = pm.CreateExtensionPoint(TerminalEmulatorConstants.TERMINAL_CONTEXT_MENU_EXTENSIONPOINT, typeof(IPoderosaMenuGroup), this);
            _contextMenu.RegisterExtension(new BasicCopyPasteMenuGroup());
            _contextMenu.RegisterExtension(new TerminalSettingMenuGroup());
            _contextMenu.RegisterExtension(new IntelliSenseMenuGroup());

            //タブのコンテキストメニュー
            _documentContextMenu = pm.CreateExtensionPoint(TerminalEmulatorConstants.DOCUMENT_CONTEXT_MENU_EXTENSIONPOINT, typeof(IPoderosaMenuGroup), this);
            _documentContextMenu.RegisterExtension(new PoderosaMenuGroupImpl(new PoderosaMenuItemImpl(
                                                                                 cs.CommandManager.Find("org.poderosa.core.session.closedocument"), GEnv.Strings, "Menu.DocumentClose")));

            //ToolBar
            IExtensionPoint toolbar         = pm.FindExtensionPoint("org.poderosa.core.window.toolbar");
            TerminalToolBar terminaltoolbar = new TerminalToolBar();

            toolbar.RegisterExtension(terminaltoolbar);
            GetSessionManager().AddActiveDocumentChangeListener(terminaltoolbar);

            //その他 Extension
            _intelliSenseExtension   = pm.CreateExtensionPoint(TerminalEmulatorConstants.INTELLISENSE_CANDIDATE_EXTENSIONPOINT, typeof(IIntelliSenseCandidateExtension), this);
            _autoLogFileFormatter    = pm.CreateExtensionPoint(TerminalEmulatorConstants.LOG_FILENAME_FORMATTER_EXTENSIONPOINT, typeof(IAutoLogFileFormatter), this);
            _dynamicCaptionFormatter = pm.CreateExtensionPoint(TerminalEmulatorConstants.DYNAMIC_CAPTION_FORMATTER_EXTENSIONPOINT, typeof(IDynamicCaptionFormatter), this);

            //Command Popup
            CommandResultSession.Init(poderosa);
            PopupStyleCommandResultRecognizer.CreateExtensionPointAndDefaultCommands(pm);

            // Preferences for PromptRecognizer
            cs.PreferenceExtensionPoint.RegisterExtension(PromptRecognizerPreferences.Instance);

            // Preferences for XTerm
            cs.PreferenceExtensionPoint.RegisterExtension(XTermPreferences.Instance);
        }
Example #26
0
        public static void Initialize()
        {
            IExtensionPoint p = TerminalEmulatorPlugin.Instance.PoderosaWorld.PluginManager.CreateExtensionPoint(TerminalEmulatorConstants.TERMINALSPECIAL_EXTENSIONPOINT, typeof(IPoderosaMenuGroup), TerminalEmulatorPlugin.Instance);

            p.RegisterExtension(new TerminalSendSpecialGroup());
        }
Example #27
0
 private void RegisterTerminalParameterSerializers(IExtensionPoint extp)
 {
     extp.RegisterExtension(new TelnetParameterSerializer());
     extp.RegisterExtension(new SSHParameterSerializer());
     extp.RegisterExtension(new SSHSubsystemParameterSerializer());
     extp.RegisterExtension(new LocalShellParameterSerializer());
 }
 public StartCommand(IExtensionPoint pt)
 {
     pt.RegisterExtension(new CygwinConnectionFactory());
     pt.RegisterExtension(new SSHConnectionFactory());
     pt.RegisterExtension(new TelnetConnectionFactory());
 }