<div dir="ltr"><div>Hi Johannes,<br><br></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">How about a warning in the ServiceHelper? It could detect if some service<br>

whose class' name does not have the org.scijava. prefix but that<br>implements SciJavaService...<br></blockquote><div><br></div><div>This is a general issue with creating contexts using top-level Service markers. I would slightly modify Curtis's words along the lines of:<br>

<br></div><div>"non-core services should only extend SciJavaService when they serve as a plug-in to scijava-common functionality"<br><br></div><div>I would expect this to come up more for SCIFIO extensions. For example, I made SCIFIO-BF-compat services directly extend SCIFIOService, because even though they are in a different component, when present on the classpath they're intended to be integrated with the SCIFIO core.<br>

<br>This allows code like: `new Context(SCIFIOService.class)` to then automatically load scifio-bf-compat services, when available.<br><br></div><div>So, conceivably, non-LOCI SCIFIO extensions would want to similarly extend SCIFIOService, but would have different package prefixes.<br>

</div><div><br></div><div>Anyway, I think a case could be made for warning when things extend SciJavaService, but I think there's the chance for such a warning to be confusing if a case arises where scijava-common functionality is truly being extended, because doing so isn't strictly wrong.<br>

<br>And if we do add a SciJavaService warning, I don't think we should extend it to similarly-patterned marker interfaces (SCIFIOService and I think I made one for IJ2 as well).<br><br></div><div>- Mark<br></div></div>

<div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Sep 25, 2013 at 11:50 AM, Johannes Schindelin <span dir="ltr"><<a href="mailto:Johannes.Schindelin@gmx.de" target="_blank">Johannes.Schindelin@gmx.de</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Curtis,<br>
<div class="im"><br>
On Wed, 25 Sep 2013, Curtis Rueden wrote:<br>
<br>
> P.S. The only slightly unintuitive thing (IMHO) is that non-core<br>
> services should *not* extend SciJavaService, because that interface is<br>
> intended for use by the org.scijava.* services *only*. (E.g.,<br>
> SCIFIOService does not extend it.)<br>
<br>
</div>How about a warning in the ServiceHelper? It could detect if some service<br>
whose class' name does not have the org.scijava. prefix but that<br>
implements SciJavaService...<br>
<br>
Ciao,<br>
Dscho<br>
<br>
_______________________________________________<br>
SCIFIO mailing list<br>
<a href="mailto:SCIFIO@scif.io">SCIFIO@scif.io</a><br>
<a href="http://scif.io/mailman/listinfo/scifio" target="_blank">http://scif.io/mailman/listinfo/scifio</a><br>
</blockquote></div><br></div>