Exemplo n.º 1
0
    def run(self, params):
        assert self._application.mainWindow is not None

        with ExecDialog(self._application.mainWindow) as dlg:
            controller = ExecDialogController(dlg, self._application)
            if controller.showDialog() == wx.ID_OK:
                begin, end = controller.getResult()
                self._getEditor().turnText(begin, end)
Exemplo n.º 2
0
    def run(self, params):
        assert self._application.mainWindow is not None

        with ExecDialog(self._application.mainWindow) as dlg:
            controller = ExecDialogController(dlg, self._application)
            if controller.showDialog() == wx.ID_OK:
                begin, end = controller.getResult()
                self._getEditor().turnText(begin, end)
Exemplo n.º 3
0
    def testDefault(self):
        from externaltools.commandexec.execdialogcontroller import ExecDialogController

        controller = ExecDialogController(self._dlg, self.application)

        result = controller.showDialog()
        begin, end = controller.getResult()

        self.assertEqual(result, wx.ID_OK)
        self.assertEqual(begin, '(:exec:)')
        self.assertEqual(end, '(:execend:)')
Exemplo n.º 4
0
    def testTitle(self):
        from externaltools.commandexec.execdialogcontroller import ExecDialogController

        controller = ExecDialogController(self._dlg, self.application)

        self._dlg.title = 'Заголовок команды'

        result = controller.showDialog()
        begin, end = controller.getResult()

        self.assertEqual(result, wx.ID_OK)
        self.assertEqual(begin, '(:exec title="Заголовок команды":)')
        self.assertEqual(end, '(:execend:)')
Exemplo n.º 5
0
    def testFormat(self):
        from externaltools.commandexec.execdialogcontroller import ExecDialogController

        controller = ExecDialogController(self._dlg, Application)

        self._dlg.format = 1

        result = controller.showDialog()
        begin, end = controller.getResult()

        self.assertEqual(result, wx.ID_OK)
        self.assertEqual(begin, u'(:exec format="button":)')
        self.assertEqual(end, u'(:execend:)')
Exemplo n.º 6
0
    def testDefault (self):
        from externaltools.commandexec.execdialogcontroller import ExecDialogController

        controller = ExecDialogController (
            self._dlg,
            Application
        )

        result = controller.showDialog()
        begin, end = controller.getResult()

        self.assertEqual (result, wx.ID_OK)
        self.assertEqual (begin, u'(:exec:)')
        self.assertEqual (end, u'(:execend:)')
Exemplo n.º 7
0
    def testTitle (self):
        from externaltools.commandexec.execdialogcontroller import ExecDialogController

        controller = ExecDialogController (
            self._dlg,
            Application
        )

        self._dlg.title = u'Заголовок команды'

        result = controller.showDialog()
        begin, end = controller.getResult()

        self.assertEqual (result, wx.ID_OK)
        self.assertEqual (begin, u'(:exec title="Заголовок команды":)')
        self.assertEqual (end, u'(:execend:)')