diff -r 2fca14bea889 -r 0b6e8c0d6403 eric6/QScintilla/EditorAssembly.py --- a/eric6/QScintilla/EditorAssembly.py Wed Sep 02 17:58:19 2020 +0200 +++ b/eric6/QScintilla/EditorAssembly.py Wed Sep 02 18:13:12 2020 +0200 @@ -42,16 +42,26 @@ from .EditorButtonsWidget import EditorButtonsWidget from .Editor import Editor + from .EditorOutline import EditorOutlineView self.__editor = Editor(dbs, fn, vm, filetype, editor, tv) self.__buttonsWidget = EditorButtonsWidget(self.__editor, self) self.__globalsCombo = QComboBox() self.__membersCombo = QComboBox() + self.__sourceOutline = EditorOutlineView(self.__editor) + # TODO: make this configurable + self.__sourceOutline.setMaximumWidth(200) self.__layout.addWidget(self.__buttonsWidget, 1, 0, -1, 1) self.__layout.addWidget(self.__globalsCombo, 0, 1) self.__layout.addWidget(self.__membersCombo, 0, 2) - self.__layout.addWidget(self.__editor, 1, 1, 1, -1) + self.__layout.addWidget(self.__editor, 1, 1, 1, 2) + self.__layout.addWidget(self.__sourceOutline, 0, 3, -1, -1) + + if not self.__sourceOutline.isSupportedLanguage( + self.__editor.getLanguage() + ): + self.__sourceOutline.hide() self.setFocusProxy(self.__editor) @@ -66,6 +76,7 @@ self.__parseTimer.setSingleShot(True) self.__parseTimer.setInterval(5 * 1000) self.__parseTimer.timeout.connect(self.__parseEditor) + self.__parseTimer.timeout.connect(self.__sourceOutline.repopulate) self.__editor.textChanged.connect(self.__resetParseTimer) self.__editor.refreshed.connect(self.__resetParseTimer)