PatternRule - resume: How to ...? [message #275763] |
Fri, 12 November 2004 04:09  |
Eclipse User |
|
|
|
Originally posted by: leo.test.com
We have class which extends the PatternRule and in general the whole issue
works quite fine. We have overwritten the doEvaluate with our own stuff
(for BracketMatching), but mainly it remains the same.
THE main problem I'm facing is that the doEvaluate has two parameter,
where one is boolean. And if this boolean is true, then it should indicate
the scanner is currently in the middle of a partion.
doEvaluate(ICharacterScanner scanner, boolean resume) {
if (resume) {
...
What I'm not able to figure out is, if there is a way to get information
at which position currently the scanner is located? The PatternRule
provides not such information, in Debug-Modus I see the information in the
scanner (which is derived from RuleBasedPartionScanner) but I cannot
access the information there.
Anybody an idea how to retrieve this information?
|
|
|
Re: PatternRule - resume: How to ...? [message #275769 is a reply to message #275763] |
Fri, 12 November 2004 05:41  |
Eclipse User |
|
|
|
LeO wrote:
> We have class which extends the PatternRule and in general the whole
> issue works quite fine. We have overwritten the doEvaluate with our own
> stuff (for BracketMatching), but mainly it remains the same.
>
> THE main problem I'm facing is that the doEvaluate has two parameter,
> where one is boolean. And if this boolean is true, then it should
> indicate the scanner is currently in the middle of a partion.
>
> doEvaluate(ICharacterScanner scanner, boolean resume) {
> if (resume) {
> ...
>
>
> What I'm not able to figure out is, if there is a way to get information
> at which position currently the scanner is located? The PatternRule
> provides not such information, in Debug-Modus I see the information in
> the scanner (which is derived from RuleBasedPartionScanner) but I cannot
> access the information there.
>
> Anybody an idea how to retrieve this information?
This is not possible with PatternRule - that means you cannot use it if
you have nested constructs (e.g. one pattern rule inside another, say,
an XML attribute inside an XML tag).
-tom
|
|
|
Powered by
FUDForum. Page generated in 0.02802 seconds