Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wtp-incubator-dev] StylesheetModel question


buildStylesheet(IDOMDocument document) method to allow just passing in a IDOMDocument for building the model instead of relying on a file. It can do what it needs under the cover, but from an editor standpoint it makes more sense to pass the current StructuredTextEditor DOM in instead of having to reload it.

If you take a look at StylesheetBuilder.build(IFile file), you will see that it actually gets the StructuredModel associated with that file, so we are in fact alredy using the StructuredTextEditor DOM under the covers.
I'm looking at it from a content assistance stand point. I already have an IDOMDocument that is passed into it through the content assistance framework for SSE and XML, so don't need to get the current model. It would make more sense from this standpoint, to just pass it the current model, and if it needs refreshed to reload it. I agree from a validation standpoint it makes sense to get it from the file system for batch validation, but for as you type validation, I would assume passing the model directly would eliminate a few calls to methods?

Just a thought.





Back to the top