Skip to content

Commit 04755c9

Browse files
committed
Gateway: add missing UIService accessor
1 parent d0d30ef commit 04755c9

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/main/java/org/scijava/AbstractGateway.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
import org.scijava.thread.ThreadService;
6262
import org.scijava.tool.IconService;
6363
import org.scijava.tool.ToolService;
64+
import org.scijava.ui.UIService;
6465
import org.scijava.widget.WidgetService;
6566

6667
/**
@@ -233,6 +234,11 @@ public ToolService tool() {
233234
return get(ToolService.class);
234235
}
235236

237+
@Override
238+
public UIService ui() {
239+
return get(UIService.class);
240+
}
241+
236242
@Override
237243
public WidgetService widget() {
238244
return get(WidgetService.class);

src/main/java/org/scijava/Gateway.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
import org.scijava.thread.ThreadService;
6060
import org.scijava.tool.IconService;
6161
import org.scijava.tool.ToolService;
62+
import org.scijava.ui.UIService;
6263
import org.scijava.widget.WidgetService;
6364

6465
/**
@@ -318,6 +319,13 @@ public interface Gateway extends RichPlugin, Versioned {
318319
*/
319320
ToolService tool();
320321

322+
/**
323+
* Gets this application context's {@link UIService}.
324+
*
325+
* @return The {@link UIService} of this application context.
326+
*/
327+
UIService ui();
328+
321329
/**
322330
* Gets this application context's {@link WidgetService}.
323331
*

0 commit comments

Comments
 (0)