Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » PatternRule - resume: How to ...?
PatternRule - resume: How to ...? [message #275763] Fri, 12 November 2004 04:09 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
Previous Topic:multiple projects and relative paths
Next Topic:why I can not get the instance of Plugin?
Goto Forum:
  


Current Time: Thu Sep 18 13:13:09 EDT 2025

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

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

Back to the top