Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mylyn-integrators] StoryMarkup

Aaron,

Comments below:

On Mon, Dec 7, 2009 at 8:04 AM, Aaron Digulla <digulla@xxxxxxxx> wrote:
Zitat von David Green <dgreen99@xxxxxxxxx>:

In practice it's ["markup"] the whole source text, however that

is not guaranteed by the API.

In that case, I need a way to tell the calling code that I need to see a much larger portion of the text than other validators. Any ideas how to implement that?

In practice you'll always get the whole document.  Validators within Mylyn WikiText rely on this fact.
 

Also, changes within the region can influence validation results outside the region. I think this needs an additional API which always gets the whole document and the range and a ValidationRule with a state. Part of the state is the range on which the rule actually worked on.

This issue is already handled: the whole document is always validated all at once.  The region passed to each validation rule is a way of having the rule validate incrementally.
 

Example: My horizon is 20 words (so I don't count duplicates which have 20 words between them). For this to work with English text, I need to look back about 200 characters (20 per word should be more than enough).

For a "don't always start a paragraph with the same word", I need to be able to see back 2-3 blocks.

So while your reconciler wants me to work on 500,30, I'll work on 300,430 instead and all problems in this area must be updated.

On a related issue: When I look for patterns with more than a single character, then boundary selection of the reconciler becomes an issue. How do you make sure I can always see all of my pattern? Is there a rule how the reconciler comes up with ranges? Is it always a full line? One block?

Ranges generally start at offset 0 and have the length of the entire document text.  As errors are found the offset is incremented to the end of the last error found.  In this way rules can be simpler to implement.  This behaviour can be modified by overriding findProblems in ValidationRule.

Regards,

David
 


findProblem() is called by the superclass.  Yes, you can.

If you haven't already feel free to install the Mylyn WikiText SDK, which
includes sources.  It'll make it a lot easier if you can just browse through
the source code.

I do have the SDK but I haven't imported everything into my project, yet. And I don't know my way around the part that I have :) Thanks for bearing with me.


Best Regards,

--
Aaron "Optimizer" Digulla a.k.a. Philmann Dark
"It's not the universe that's limited, it's our imagination.
Follow me and I'll show you something beyond the limits."
http://www.pdark.de/                   http://blog.pdark.de/
_______________________________________________
mylyn-integrators mailing list
mylyn-integrators@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/mylyn-integrators


Back to the top