Skip to main content

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

I've been writing several unit tests for the StylesheetModel just to learn what is there, and also to provide a regression test suite. One question I have is, is the model currently synched with the model that is in the editor, or is it synched with the last saved version of the stylesheet that is being editted. The reason I ask, is that if it's only synched with the model that was last saved, then it can be difficult to get reliable results on the current stylesheet if content has changed and hasn't been saved. Where this comes into affect are instances where one is trying to get the name of all templates, or modes with in the stylsheet. If the model isn't synchronized real time, then when you call the Model Builder it'll be out of synch with what is actually in the editor.

One option, that might be nice is a way to pass the current Structured Document to the model, and have a refresh method that will refresh the cached model. This way the model can be explicitly refreshed to get any new includes and imports that have been added but not saved, as well, as any other templates. I've found a few other possible bugs that I've opened up with unit tests included, which we can discuss there, but should an enhancement request be opened for the above?

Dave




Back to the top