Skip to main content

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

Yes it is synched with the edited files via the SSE validation framework - so it is always being kept up to date in the background while you are editing (not quite real-time, but good enough). This is how things get validated as you type. You can refresh any stylesheet in the model at any time by calling XSLCore.buildStylesheet(file) - though it should not be necessary as it should always be up to date anyway. So no enhancement request required!
Note that there are lots of things that can be done to the model - I have only done the bare minimum needed to validate it to the degree we have needed so far, and it will need to be extended as we go along.



----- Original Message ----
> From: David Carver <d_a_carver@xxxxxxxxx>
> To: WTP Incubator Dev list <wtp-incubator-dev@xxxxxxxxxxx>
> Sent: Monday, 8 September, 2008 3:23:43 AM
> Subject: [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
> 
> 
> _______________________________________________
> wtp-incubator-dev mailing list
> wtp-incubator-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/wtp-incubator-dev



Back to the top