[tasklist] Line.getDataObject()

Tor Norbye <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.tasklist.devel
Organization Sun Microsystems, Inc
Message-ID <1050463889.8725.7.camel@proto>
Hi there,
somebody (Yarda or Jesse, I can't remember) recently committed
a change to the tasklist module where they substituted
   line.getDataObject()
with
   DataEditorSupport.findDataObject(line)

I thought "great!". That will fix the big problem that's been
bothering me for a while, so I don't have to write to dev@tasklist
about it!

Tonight I replaced all the remaining line.getDataObject() calls
in tasklist with the new form.

But - turns out the problem is still there.

The problem I'm referring to is 
  http://www.netbeans.org/issues/show_bug.cgi?id=32210
  Line.getDataObject sometimes returns null

Here's the problem. I have a data object. I know the line
number. I look up the Line object for it. And I store
that Line object with each suggestion.

Then, in the tree table, I want to display the original
file name and line number. So I just ask for the
data object (to get the filename via primaryfile),
and I ask line to provide its line number.

The problem is that, for Bundle.properties files in 
particular, Line.getDataObject returns null.

Sooooo.... unless you can think of a better solution,
we need to not only keep a Line reference with
each Suggestion object, but a DataObject reference
as well.

Or will this situation be fixed now with the data system
rewrite?

-- Tor


--  
Tor Norbye <[email protected]>
Sun Microsystems, Inc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.