16 from PyQt4.Qsci import QsciScintilla |
16 from PyQt4.Qsci import QsciScintilla |
17 |
17 |
18 from E5Gui.E5Application import e5App |
18 from E5Gui.E5Application import e5App |
19 from E5Gui import E5MessageBox |
19 from E5Gui import E5MessageBox |
20 |
20 |
21 from . import Lexers |
|
22 from .QsciScintillaCompat import QsciScintillaCompat |
21 from .QsciScintillaCompat import QsciScintillaCompat |
23 |
22 |
24 import Preferences |
23 import Preferences |
25 |
24 |
26 import UI.PixmapCache |
25 import UI.PixmapCache |
27 from UI.SearchWidget import SearchWidget |
|
28 |
26 |
29 from Debugger.DebugClientCapabilities import HasCompleter |
27 from Debugger.DebugClientCapabilities import HasCompleter |
30 |
|
31 from .ShellHistoryDialog import ShellHistoryDialog |
|
32 |
28 |
33 |
29 |
34 class ShellAssembly(QWidget): |
30 class ShellAssembly(QWidget): |
35 """ |
31 """ |
36 Class implementing the containing widget for the shell. |
32 Class implementing the containing widget for the shell. |
45 @param parent parent widget (QWidget) |
41 @param parent parent widget (QWidget) |
46 """ |
42 """ |
47 super().__init__(parent) |
43 super().__init__(parent) |
48 |
44 |
49 self.__shell = Shell(dbs, vm, self) |
45 self.__shell = Shell(dbs, vm, self) |
|
46 |
|
47 from UI.SearchWidget import SearchWidget |
50 self.__searchWidget = SearchWidget(self.__shell, self, horizontal) |
48 self.__searchWidget = SearchWidget(self.__shell, self, horizontal) |
51 self.__searchWidget.hide() |
49 self.__searchWidget.hide() |
52 |
50 |
53 if horizontal: |
51 if horizontal: |
54 self.__layout = QHBoxLayout(self) |
52 self.__layout = QHBoxLayout(self) |
288 |
286 |
289 @param language lexer language to set (string) |
287 @param language lexer language to set (string) |
290 """ |
288 """ |
291 self.language = language |
289 self.language = language |
292 if Preferences.getShell("SyntaxHighlightingEnabled"): |
290 if Preferences.getShell("SyntaxHighlightingEnabled"): |
|
291 from . import Lexers |
293 self.lexer_ = Lexers.getLexer(self.language, self) |
292 self.lexer_ = Lexers.getLexer(self.language, self) |
294 else: |
293 else: |
295 self.lexer_ = None |
294 self.lexer_ = None |
296 |
295 |
297 if self.lexer_ is None: |
296 if self.lexer_ is None: |
566 |
565 |
567 def __showHistory(self): |
566 def __showHistory(self): |
568 """ |
567 """ |
569 Private slot to show the shell history dialog. |
568 Private slot to show the shell history dialog. |
570 """ |
569 """ |
|
570 from .ShellHistoryDialog import ShellHistoryDialog |
571 dlg = ShellHistoryDialog(self.history, self.vm, self) |
571 dlg = ShellHistoryDialog(self.history, self.vm, self) |
572 if dlg.exec_() == QDialog.Accepted: |
572 if dlg.exec_() == QDialog.Accepted: |
573 self.historyLists[self.clientType] = dlg.getHistory() |
573 self.historyLists[self.clientType] = dlg.getHistory() |
574 self.history = self.historyLists[self.clientType] |
574 self.history = self.historyLists[self.clientType] |
575 self.histidx = -1 |
575 self.histidx = -1 |