Login  Register

Re: TextField in Fiji

Posted by ctrueden on Oct 09, 2013; 4:17pm
URL: http://imagej.273.s1.nabble.com/TextField-in-Fiji-tp5005091p5005107.html

Hi Dscho,

> Yes, you should always import the classes you use explicitly.
> Otherwise your code is prone to break whenever classes are introduced
> into packages which have the same name of classes in other packages.

A reminder that many of these specific problems (e.g., "TextField") will be
avoided in the future once my "volume-viewer-package" branch is reviewed
and merged to master:

https://github.com/fiji/fiji/commit/2ee980be3ccc22ed38ff54594ad89dc3db2b8390

Regards,
Curtis


On Wed, Oct 9, 2013 at 7:41 AM, Johannes Schindelin <
[hidden email]> wrote:

> Hi Andrew,
>
> On Wed, 9 Oct 2013, Bell, Andrew wrote:
>
> > Thank you for the explanation.
>
> You are welcome!
>
> > In general, therefore, should I always be explicitly importing? The
> > plugin I have written for example, makes use of many of the java.awt
> > components, and although it works, is it "more right" to implicitly
> > import rather than use wildcards?
>
> Yes, you should always import the classes you use explicitly. Otherwise
> your code is prone to break whenever classes are introduced into packages
> which have the same name of classes in other packages.
>
> Ciao,
> Johannes
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html