-
Notifications
You must be signed in to change notification settings - Fork 11
/
files.txt
142 lines (107 loc) · 5.9 KB
/
files.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
Having fiddled around the edges long enough, I'd like to start tackling some of the main pieces of IDLE, which will require a substantial restructuring. Luckily, it's only about 4000-5000 lines of code that should be affected.
Outline of my tentative plans below. If anyone sees any red flags, speak up!
Goals:
1. split off tangential features from mega-modules (EditorWindow and PyShell)
2. better encapsulation; reduce internal knowledge about other modules
3. reduce assumptions affecting how UI assembled (e.g. toplevels)
4. reduce redundancies
5. make it easier for new IDLE contributors to navigate code base
Non-goals (for now anyway):
1. internal API stability
2. supporting people using pieces of idlelib
3. keeping third party IDLE extensions working
4. keeping existing tests working
A special note on the last point. Adapting (relevant) existing tests, and filling in holes in testing needs to happen sooner than later. But because of how things will be broken up (hence destroying API stability) likely most of the tests will be broken to start with.
The other question of course is how this monstrosity of changes can be realistically condensed into a "patch", but I'll leave thinking about that for now.
Work Items:
1. Define a "IdleComponent" class (effectively a frame or toplevel). Examples would be editor windows, shell, prefs dialog, etc. Base class provides an API for various responsibilities, notifications etc. that can be handled in subclasses if needed.
2. Replace WindowList, FileList, PyShellFileList with a smarter "hub" that ties all the pieces of the application together (see previous point). Also serves as a way to broadcast changes application wide, manage overall application state, etc.
3. Create a "IdleMainWindow" which would bundle together a tabbed editor, status bar, debug panel, shell area via paned windows etc. Keep this as simple as possible (delegating to other components) so that experimenting with how pieces are put together is easier.
4. Improve module level documentation to help people navigating code base. Clarify role of module within application. Specifically highlight modules that are present for Tk 8.4 compatibility only, so they can be later removed.
5. EditorWindow - move all the help stuff into a separate module
6. EditorWindow - trim responsibilities so it handles "just" editor stuff. For example, things about launching dialogs, creating menu bars, etc. should get moved elsewhere. Should only respond to editor-related menu commands, while more 'application level' menu commands get done elsewhere.
7. Abstract/centralize all the menu management, key bindings etc. as required, delegating minimum amount needed to IdleComponent subclasses. Will likely center around the notion of commands (which may be equivalent to the virtual events used now), but components shouldn't have to mess with menus (would enable putting toolbars etc. in later if desired)
8. PyShell - split ModifiedInterpreter, Pseudo*File into other modules, strip PyShell class to core functionality like with EditorWindow (e.g. move debugger commands elsewhere). This module is a prime candidate to have everything moved elsewhere, leaving it basically as a main application startup script.
9. Make it so that we always have a Python shell/interpreter (like we do now) and a debugger object (or wrapper) available, even if they're not onscreen. Ideally separate debugger at least from a UI, so that UI can be created as needed and attach to underlying object.
MONOLITHS
1725 EditorWindow.py
1615 PyShell.py
--------
3340
CORE TEXT HANDLING CODE
233 SearchEngine.py
365 UndoDelegator.py
104 IdleHistory.py
256 ColorDelegator.py
25 Delegator.py
104 Percolator.py
446 MultiCall.py
176 WidgetRedirector.py
--------
1709
(MOSTLY) NON-GUI CODE
758 configHandler.py
402 run.py
621 rpc.py
313 HyperParser.py
617 PyParse.py
36 RemoteObjectBrowser.py
388 RemoteDebugger.py
554 IOBinding.py
--------
3689
OLD UI DIALOG CODE
146 aboutDialog.py - invoked by EditorWindow
108 PathBrowser.py - invoked by EditorWindow
1435 configDialog.py - invoked by EditorWindow
157 GrepDialog.py - invoked by EditorWindow
221 ReplaceDialog.py - invoked by EditorWindow
89 SearchDialog.py - invoked by EditorWindow
193 SearchDialogBase.py - invoked by EditorWindow
490 Debugger.py - invoked by PyShell
143 ObjectBrowser.py
236 ClassBrowser.py
166 configHelpSourceEdit.py - from configDialog
98 configSectionNameDialog.py - from configDialog
266 keybindingDialog.py - from configDialog
--------
3748
OLD UI UTILITY CODE
48 MultiStatusBar.py - used by EditorWindow
498 tabbedpages.py - used by configDialog
78 dynOptionMenuWidget.py - used by configDialog
97 ToolTip.py - not used at all
466 TreeWidget.py - used by ClassBrowser, ObjectBrowser, PathBrowser,
Stackviewer, PyShell,
86 textView.py - used by about dialog
236 macosxSupport.py - used by EditorWindow, Debugger, PyShell,
configDialog, plus some extensions
90 WindowList.py - used by Debugger, EditorWindow, macosxSupport
140 ScrolledList.py - used by Debugger
160 CallTipWindow.py - used by CallTip extension
415 AutoCompleteWindow.py - used by AutoComplete extension
152 StackViewer.py
144 OutputWindow.py
129 FileList.py
95 Bindings.py (define menus)
--------
2834
NEW UI CODE
134 tkextras.py
2204 uipreferences.py
130 querydialog.py
DEFAULT CONFIGURATION FILES
99 config-extensions.def
64 config-highlight.def
214 config-keys.def
76 config-main.def
EXTENSIONS
233 AutoComplete.py
104 AutoExpand.py
175 CallTips.py
179 CodeContext.py
195 FormatParagraph.py
178 ParenMatch.py
33 RstripExtension.py
204 ScriptBinding.py
51 ZoomHeight.py