Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wtp-dev] IStructuredModel: releaseFromRead() ramifications

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.

Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational

Ian Trimble <ian.trimble@xxxxxxxxxx>
Sent by: wtp-dev-bounces@xxxxxxxxxxx

02/12/2009 03:18 PM

Please respond to
"General discussion of project-wide or architectural issues."        <wtp-dev@xxxxxxxxxxx>

[wtp-dev] IStructuredModel: releaseFromRead() ramifications

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 Canada | 754 Nanoose Avenue | V9P 1E8 Parksville, BC
Green Oracle Oracle is committed to developing practices and products that help protect the environment

wtp-dev mailing list

Back to the top