Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » RuleBasedScanner and getColumn()
RuleBasedScanner and getColumn() [message #323800] Tue, 08 January 2008 23:42 Go to next message
Eclipse UserFriend
I've recently been working on new document structure, and was using a
RuleBasedScanner subclass to scan for partition changes. I was relying
on getColumn(), since my partition end tokens had to start in column 0.

The problem is that RuleBasedScanner apparently caches the result of
getColumn() in the fColumn member. It only gets reset on the next call
to nextToken().

In my subclass, I fixed this by overriding read() and unread() to
invalidate the getColumn() cache (i.e. set fColumn to UNDEFINED). I'm
just curious whether this behavior is expected, or a bug.
Re: RuleBasedScanner and getColumn() [message #323843 is a reply to message #323800] Wed, 09 January 2008 19:19 Go to previous message
Eclipse UserFriend
Anthony W. Juckel wrote:
> I've recently been working on new document structure, and was using a
> RuleBasedScanner subclass to scan for partition changes. I was relying
> on getColumn(), since my partition end tokens had to start in column 0.
>
> The problem is that RuleBasedScanner apparently caches the result of
> getColumn() in the fColumn member. It only gets reset on the next call
> to nextToken().
>
> In my subclass, I fixed this by overriding read() and unread() to
> invalidate the getColumn() cache (i.e. set fColumn to UNDEFINED). I'm
> just curious whether this behavior is expected, or a bug.

Submitted as bug #214770.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=214770

I've included a test case and patch with the bug report, under the
assumption that the behavior was incorrect and worth fixing (well, it
was worth it to me, obviously).
Previous Topic:viewShortcut and Key Bindings
Next Topic:Border problem of CCombo in the FormEditor.
Goto Forum:
  


Current Time: Sat Jul 19 09:20:47 EDT 2025

Powered by FUDForum. Page generated in 0.03690 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top