|
Re: How to initiate validation of a SSE StructuredDocument [message #208435 is a reply to message #208354] |
Mon, 11 February 2008 15:25 |
|
Gerry Kessler wrote:
> I have a quick fix proposal that will fix an EL problem by creating a
> variable outside of the current source viewer. This means that the
> proposal won't update the current text region to become dirty, and
> therefore won't re-validate automatically.
> Ideally I would like to validate only the current region, but in some
> cases I may want to re-validate the entire document. I want to do this
> when the proposal is applied.
>
> Is there API to initiate validation of a SSE StructuredDocument or a
> region within?
Gerry,
You'll want to look up the org.eclipse.wst.sse.ui.sourcevalidation
extension point and the
org.eclipse.wst.sse.ui.internal.reconcile.validator.ISourceV alidator
interface (which will at least be moved into sse.core at some point).
_
Nitin Dahyabhai
Eclipse Web Tools Platform
|
|
|
|
Re: How to initiate validation of a SSE StructuredDocument [message #208567 is a reply to message #208465] |
Wed, 13 February 2008 03:14 |
|
Gerry Kessler wrote:
> Nitin,
> Maybe I wasn't quite clear, or maybe I am missing something. We already
> have a source validator. During validation, we are attaching an
> IQuickFixProcessor using message.setAttribute in the prescribed manner
> of https://bugs.eclipse.org/bugs/show_bug.cgi?id=170988.
> The issue here is that the source will not change after applying this
> particular proposal, so a validation will not re-fire automatically.
> How can I cause a re-validation event?
There's no direct way of causing this, much less a supported one. I
suppose the only thing you could do as a workaround is to replace
the text spanning the annotation's offset and length with the same
text, forcing the document event to be generated and the area to be
revalidated.
---
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational
_
Nitin Dahyabhai
Eclipse Web Tools Platform
|
|
|
|
Re: How to initiate validation of a SSE StructuredDocument [message #208620 is a reply to message #208611] |
Thu, 14 February 2008 22:24 |
|
Cameron Bateman wrote:
> What about using this new validation framework object?
>
> Validator[] validators = ValidationFramework.getValidatorsFor(...).
>
> for (Validator validator : validators)
> { validator.validate(...);
> }
There's a catch in that the output from those validators would need
to be rerouted to create text Annotations (they make the squiggles),
something that's only done by the editor's internals.
---
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational
_
Nitin Dahyabhai
Eclipse Web Tools Platform
|
|
|
Powered by
FUDForum. Page generated in 0.03531 seconds