Commit 640782f
committed
Make the HeadlessUI a real boy
The HeadlessUI is now a SciJava UserInterface plugin, just like
any other user interface. This is useful because while we want it
to always be chosen when headless mode is active, it should also
be used in non-headless mode when nothing else is available.
This will help prevent NPEs etc. in UIService method calls.
Consequently, this commit adds some defensive checks to
DefaultUIService. These are needed now with the new HeadlessUI,
because that UI returns null for methods like dialogPrompt --
something that no other UIs did previously. In other words: we
relaxed the postconditions of some UserInterface methods to allow
for null returns, and therefore the DefaultUIService needs to
behave accordingly, handling those nulls.1 parent aa8be0f commit 640782f
File tree
2 files changed
+13
-99
lines changed- src/main/java/org/scijava/ui
- headlessUI
2 files changed
+13
-99
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
| 192 | + | |
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
305 | | - | |
| 305 | + | |
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
311 | | - | |
312 | | - | |
| 311 | + | |
313 | 312 | | |
314 | 313 | | |
315 | 314 | | |
316 | 315 | | |
317 | 316 | | |
318 | 317 | | |
319 | 318 | | |
320 | | - | |
321 | | - | |
| 319 | + | |
322 | 320 | | |
323 | 321 | | |
324 | 322 | | |
325 | 323 | | |
326 | 324 | | |
327 | 325 | | |
328 | 326 | | |
329 | | - | |
330 | | - | |
| 327 | + | |
331 | 328 | | |
332 | 329 | | |
333 | 330 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | 34 | | |
37 | 35 | | |
38 | | - | |
| 36 | + | |
39 | 37 | | |
40 | | - | |
41 | | - | |
42 | | - | |
| 38 | + | |
| 39 | + | |
43 | 40 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | 41 | | |
48 | | - | |
49 | 42 | | |
50 | 43 | | |
51 | 44 | | |
52 | 45 | | |
53 | 46 | | |
54 | 47 | | |
55 | 48 | | |
| 49 | + | |
56 | 50 | | |
57 | | - | |
58 | | - | |
59 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
60 | 54 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
| 55 | + | |
70 | 56 | | |
71 | 57 | | |
72 | 58 | | |
| |||
76 | 62 | | |
77 | 63 | | |
78 | 64 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | 65 | | |
83 | 66 | | |
84 | 67 | | |
85 | 68 | | |
86 | 69 | | |
87 | 70 | | |
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 | 71 | | |
119 | 72 | | |
120 | 73 | | |
| |||
128 | 81 | | |
129 | 82 | | |
130 | 83 | | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | 84 | | |
137 | 85 | | |
138 | 86 | | |
| |||
156 | 104 | | |
157 | 105 | | |
158 | 106 | | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | 107 | | |
183 | 108 | | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | 109 | | |
0 commit comments