uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Lally" <ala...@alum.rpi.edu>
Subject Re: Somebody please figure out how to do this better (was Re: svn commit: r475808 - in /incubator/uima/uimaj/trunk/uimaj-tools/src: main/java/org/apache/uima/tools/viewer/CasAnnotationViewer.java test/java/org/apache/uima/tools/viewer/CasAnnotationVi
Date Mon, 20 Nov 2006 15:32:15 GMT
On 11/16/06, Thilo Goetz <twgoetz@gmx.de> wrote:
> Adam Lally wrote:
> > I fixed a bug (reported on the forum) that the Annotation Viewer
> > didn't support the new primitive types.  But I'm not so happy with my
> > fix... it involved a lot of if..else if blocks for each of the
> > different array types.  You can get an idea of how ugly it was to
> > implement this just by scanning the patch quoted below.  Is there a
> > better way?  Should I create a new JIRA issue for cleaning this up?
> >
> > -Adam
> I was going to answer "you can use LowLevelCAS.ll_getTypeClass(int
> typeCode)" but I see that Bhavani failed to update that method for the
> new types.  I will have to deal with the same thing in the CVD one of
> these days.  When I do, I'll go back to the annotation viewer and see if
> I can straighten things out.

(I apologize if I sent this already... I meant to, but I don't see it
anywhere now that I look.)

What would have been nice is a common superinterface of all the
primitive array types, which defines a toStringArray() method.  The
toStringArray() methods are already there on the impls, but there's no
superinterface that I can use to get at them.


View raw message