Commit 8273302
Entry tooltips (#307)
* add POC tooltip to EditorPanel editor that shows full name of entry under cursor
* update tooltip content when mouse moves, but can't get JToolTip to resize+move
* replace EditorPanel's use of JToolTip and TooltipManager with JWindow and timers, respectively
* check if same token instead of same entry when updating tooltip
* replace complex Optional composition with consumer methods
* extract BaseEditorPanel without tooltip, navigator, or listeners
* display entries' entire outer source class in their tooltips
* always set tooltipEditor classhandle instead of setting source when it's the same class (editor bounds were 0x0 when setting source)
navigate to tooltip target entry declaration when showing tooltip
* add javaparser dep matching #308
* implement source trimming for classes using javaparser
* minor improvements
* minor cleanup
* make trimFactor a param instead of a field
* implement source trimming for methods
* match declarations only by range and extract findDeclaration
* inline variable
* implement field source trimming
stop excluding curly braces from method and class sources
* fix tooltip source trimming for static record fields
add "No source available" label when there's no classhandle
* update TODOs
centralize target name reporting
* extract TooltipEditorPanel
* trim param tooltip target source to parent method
refine error messages
* fail early when target declaration token is missing
add local source trimming
* fix tooltip source trimming for constructors
* minor refactor
* show record component parent instead of just component; matches param showing parent method
* when excluding implements from record component parent, find token instead of assuming offset
* close and destroy tooltip when source changes
* silently ignore missing declaration tokens (until #252 is fixed)
* restore quickFindToolbar to ui
stop closing tooltip's class handles as tabs may still need them; remove ClassHandleListener instead
rename TooltipEditorPanel -> DeclarationSnippetPanel
extract EditorTooltip
add test input for easier manual tooltip testing
* restore EditorPanel popupMenu functionality
* improve caret pos logic in BaseEditorPanel::setSource
* replace source with message if the declaration token could be found
* implement source snippet unindenting
* replace entry simple name label with formatted parent name label
* add 'From: ' prefix to parent label
left-align tooltip rows
* add javadocs to tooltip
* allow disabling tooltip
* make tooltip optionally interactable
implement dragging to move tooltip
* prevent hiding tooltip when cursor is over a token or the tooltip
* fix parent label for top-level classes and add missing dot separator for package
format labels
use GridBagLayout for param javadocs (currently takes up extra space)
* allow clicking entries withing tooltip to populate tooltip with that entry's information
* fix calculation for offsetting multiline snippet pos to un-trimmed pos
allow clicking parent entries in tooltips to populate tooltip
when ctrl+clicking entries in tooltips, open entry tab
* minor improvements, add TODOs
* resolve references when finding tooltip targets
* customize tooltip target highlighting
* update TODOs regarding records
* polish tooltip positioning
fix exception when consumeMousePosition... methods where passed a component that wasn't showing
fix several cases where the tooltip would hide when it shouldn't or hiden't when it should
* increase padding at outer edges of tooltip rows
add tooltip border
* use a JPanel with a GridBagLayout instead of a Box as the content pane for EditorTooltip; allows elements to expand to fill their space
double-pack in EditorTooltip's declarationSnippet source set listener to eliminate extra space, because swing </3
* reject some TODOs
* ctrl+click on parent package label to naviage to package
* fix tooltip separators
improve "No source available" message formatting
* respect tooltip ineractable config for parent package clicking
add z_ prefix to tooltip test input to avoid changing SearchMappingsTest
* use global focus listener to ensure tooltip is closed when neither it nor its editor has focus
* move consumeMousePosition... methods to GuiUtil
* rename EditorTooltip -> EntryTooltip
use GridBagConstraintsBuilder in EntryTooltip
respect scale config in EntryTooltip
* use GridBagConstraintsBuilder in initEditorPane
* make tooltip focusable; enables copying tooltip content
* fix hiding tooltip immediately after re-populating it
simplify tooltip focus and hiding logic
* remove tooltip to editor click forward as it didn't work consistently
remove unecessary insteractable tooltip click listener
* add EntryTooltip.repopulated field for workaround
* deobfuscate parent package
* focus class selector when navigating to parent package from tooltip
* scroll to class selector path when navigating from entry tooltip parent
* move Config.persistentEditorQuickFind to EditorConfig.persistentQuickFind
* rename config getter methods to match their ids and update Config javadoc
* fix another tooltip focus issue
* fix bug preventing RecordGetterFindingVisitor from finding inner records' getters
make RecordGetterFindingVisitor's getter map accessible
fix DeclarationSnippetPanel for record component getters
* rename RecordGetterFindingVisitor -> RecordIndexingVisitor
expand RecordGetterFindingVisitor to provide maps of record classes to their fields and methods
make EntryTooltip show record field javadocs for record classes
make EntryTooltip show record field javadocs for record getters if they don't have their own javadocs
* clear things in visitEnd instead of visit
clear fields and methods
* fix for java 17
* tighten RecordIndexingVisitor encapsulation
* make navigating to a record component getter with no explicit declaration navigate to its field instead
* add nullable annotation
* only set BaseEditorPanel.editor text once
* fix typo
* tweak moveMaintainingAnchor
* close entry tooltip on key press
* close tooltip on KEY_TYPED instead of KEY_PRESSED so ctrl+c can copy
* add javaparser to lib list in README
* cleanup createSnippet
* fix swapped un/bounded names
* make LineIndexer::getIndex return -1 for out-of-bounds positions, add LineIndexerTest
* rename EditorTooltipSection -> EntryTooltipSection
* limit EntryTooltip size
* put main tooltip content in a scroll pane
* focus snippet editor ui on source set
remove main content scroll pane border
* checkstyle
* replace AtomicInteger gridY's with primitive ints
* hard cap tooltip width at 600px (scaled)
* expand parent package path when navigating from tooltip
* explicitly check if source is bounded when setting 'Unable to locate declaration' message
show <init> for constructor simple names
* improve constructor name check
* use 'inherited from' label for tooltip labels for entries that resolved to a parent
* dispatch key events that close the entry tooltip to the previously focused component
* close entry tooltip with global mouse listener
* add gui for entry tooltip config
* deduplicate check box sync logic
* javadoc createSyncedCheckBox
* javadoc syncStateWithConfig override
* move tooltip management to EnitorPanel.TooltipManager
add/remove EntryTooltip's global listeners on open/close
reset TooltipManager on key presses
* minor refactor
* make 'tooltips' consistently plural in user-facing strings
* dispatch KEY_PRESSED events that close entry tooltips (with exception for ctrl+c)
* rework moveMaintainingAnchor when tooltip shrunk
* move FeaturesSection.enableClassTreeStatIcons to StatsSection
move FeaturesSection.autoSaveMappings to EditorConfig
eliminate FeaturesSection
* ensure RecordIndexingVisitor is cleared in visitEnd
* make several tooltip string translatable
* make a snippet string translatable1 parent 59c0059 commit 8273302
File tree
44 files changed
+3113
-601
lines changed- enigma-swing
- src/main/java/org/quiltmc/enigma/gui
- config
- keybind
- dialog
- docker
- component
- element
- node
- panel
- util
- enigma/src
- main
- java/org/quiltmc/enigma
- api
- source
- translation/representation/entry
- impl/plugin
- util
- resources/lang
- test/java/org/quiltmc/enigma
- input/z_tooltip
- util
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
44 files changed
+3113
-601
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
170 | 171 | | |
171 | 172 | | |
172 | 173 | | |
173 | | - | |
174 | | - | |
| 174 | + | |
| 175 | + | |
175 | 176 | | |
176 | 177 | | |
177 | 178 | | |
| |||
402 | 403 | | |
403 | 404 | | |
404 | 405 | | |
405 | | - | |
| 406 | + | |
406 | 407 | | |
407 | 408 | | |
408 | 409 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
| 200 | + | |
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
| |||
570 | 570 | | |
571 | 571 | | |
572 | 572 | | |
573 | | - | |
| 573 | + | |
574 | 574 | | |
575 | 575 | | |
576 | 576 | | |
| |||
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
75 | 76 | | |
76 | 77 | | |
77 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
78 | 82 | | |
79 | | - | |
80 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
81 | 89 | | |
82 | 90 | | |
83 | 91 | | |
| |||
Lines changed: 19 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
40 | 49 | | |
41 | 50 | | |
42 | 51 | | |
| |||
52 | 61 | | |
53 | 62 | | |
54 | 63 | | |
| 64 | + | |
55 | 65 | | |
56 | 66 | | |
57 | 67 | | |
| |||
71 | 81 | | |
72 | 82 | | |
73 | 83 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | 84 | | |
78 | 85 | | |
79 | 86 | | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | 87 | | |
84 | 88 | | |
85 | 89 | | |
| |||
115 | 119 | | |
116 | 120 | | |
117 | 121 | | |
118 | | - | |
| 122 | + | |
119 | 123 | | |
120 | 124 | | |
121 | 125 | | |
122 | | - | |
| 126 | + | |
123 | 127 | | |
124 | 128 | | |
125 | 129 | | |
| |||
131 | 135 | | |
132 | 136 | | |
133 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
134 | 142 | | |
135 | 143 | | |
136 | 144 | | |
| |||
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
| 10 | + | |
13 | 11 | | |
14 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
15 | 19 | | |
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
0 commit comments