Skip to content

Commit c1849d7

Browse files
authored
Merge pull request #457 from scijava/location-gateway
Gateway: add LocationService getter
2 parents 1884b24 + ccf35cd commit c1849d7

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
@@ -42,6 +42,7 @@
4242
import org.scijava.input.InputService;
4343
import org.scijava.io.IOService;
4444
import org.scijava.io.RecentFileService;
45+
import org.scijava.io.location.LocationService;
4546
import org.scijava.log.LogService;
4647
import org.scijava.main.MainService;
4748
import org.scijava.menu.MenuService;
@@ -190,6 +191,11 @@ public InputService input() {
190191
public IOService io() {
191192
return get(IOService.class);
192193
}
194+
195+
@Override
196+
public LocationService location() {
197+
return get(LocationService.class);
198+
}
193199

194200
@Override
195201
public LogService log() {

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
import org.scijava.input.InputService;
4141
import org.scijava.io.IOService;
4242
import org.scijava.io.RecentFileService;
43+
import org.scijava.io.location.LocationService;
4344
import org.scijava.log.LogService;
4445
import org.scijava.main.MainService;
4546
import org.scijava.menu.MenuService;
@@ -238,6 +239,13 @@ public interface Gateway extends RichPlugin, Disposable {
238239
*/
239240
IOService io();
240241

242+
/**
243+
* Gets this application context's {@link LocationService}.
244+
*
245+
* @return The {@link LocationService} of this application context.
246+
*/
247+
LocationService location();
248+
241249
/**
242250
* Gets this application context's {@link LogService}.
243251
*

0 commit comments

Comments
 (0)