Ian,
It may not, but you definitely should consider it as such.  When the 
model's been released enough times for the model manager's internal 
reference count to drop to zero, a ModelLifecycleEvent is fired to 
interested listeners indicating this, the results of which I can't 
predict.  More importantly for you, the underlying text document is also 
disconnected from the ICSSModel, so really you're just waiting for 
something to fail from then on.

Regards,
---
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational




Ian Trimble <[email protected]> 
Sent by: [email protected]
02/12/2009 03:18 PM
Please respond to
"General discussion of project-wide or architectural issues." 
<[email protected]>


To
[email protected]
cc

Subject
[wtp-dev] IStructuredModel: releaseFromRead() ramifications






Hi.
 
I'm currently working on functionality in the JSF Tools Project. I have a 
question regarding IStructuredModel handling.
 
I'm doing the following (to load a CSS file):
 - getting an IStructuredModel instance (for read) from the 
StructuredModelManager
 - casting this model to an ICSSModel instance
 - calling getDocument() on the ICSSModel instance
 
My question is this: once I have the ICSSDocument instance (that I need to 
persist for an arbitrary period of time), can I call releaseFromRead() on 
the ICSSModel instance immediately, or does releasing the model render the 
document unusable?
 
Thanks in advance,
 - Ian
 

Ian Trimble | Principal Software Developer
Phone: +2509540837 | Fax: +2509540837 
Oracle Eclipse

ORACLE Canada | 754 Nanoose Avenue | V9P 1E8 Parksville, BC 

Oracle is committed to developing practices and products that help protect 
the environment
 _______________________________________________
wtp-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/wtp-dev

<<image/gif>>

<<image/gif>>

_______________________________________________
wtp-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/wtp-dev

Reply via email to