<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi Johannes,<div><br><div><div>On 22 Aug 2014, at 17:53, Johannes Schindelin <<a href="mailto:Johannes.Schindelin@gmx.de">Johannes.Schindelin@gmx.de</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi Tobias,<br><br>On Fri, 22 Aug 2014, Tobias Pietzsch wrote:<br><br><blockquote type="cite"> final ImgOpener opener = new ImgOpener( new Context(<br> SCIFIOService.class, AppService.class, StatusService.class ) );<br></blockquote><br>Why do you create a new Context everytime? That's a bit wasteful…</blockquote><div><br></div><div>That is true, but I’m not sure how to improve it.</div><div><br></div><div>The problem is that I know too little about how the infrastructure around Context works.</div><div>I assume in Fiji there is only one Context that is used by everything? An I get it the way you described?</div><div>In Eclipse, for testing, I have a main() method that just says</div><div><div style="margin: 0px; font-size: 11px; font-family: Monaco;"><span style="color: #931a68">new</span> ExportSpimSequencePlugIn().run( <span style="color: #931a68">null</span> );</div><div>so there is no Fiji that has a Context.</div><div>How would I make something that works in both cases?</div><div><br></div><div>best regards,</div><div>Tobias</div></div><br><blockquote type="cite"><br>Ciao,<br>Johannes<br></blockquote></div><br></div></body></html>