Skip to main content

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

Nitin,
 
This is pretty much as I suspected, so I'll need to find a more solid way to handle things in my code.
 
Thanks for your insight,
 - Ian
-----Original Message-----
From: Nitin Dahyabhai [mailto:nitind@xxxxxxxxxx]
Sent: Thursday, February 12, 2009 12:58 PM
To: wtp-dev@xxxxxxxxxxx
Subject: Re: [wtp-dev] IStructuredModel: releaseFromRead() ramifications


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 <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>

To
wtp-dev@xxxxxxxxxxx
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
 
Oracle
Ian Trimble | Principal Software Developer
Phone: +2509540837 | Fax: +2509540837

Oracle
Eclipse

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
wtp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/wtp-dev


Back to the top