[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.webtools] Re: StructuredModelManager
|
- From: kschaef@xxxxxxxxxx (Klaussen)
- Date: Wed, 24 Oct 2007 15:51:35 +0000 (UTC)
- Newsgroups: eclipse.webtools
- Organization: Eclipse
- User-agent: NewsPortal/0.36 (http://florian-amrhein.de/newsportal)
Hi, this works great. But until now I release the model from reading. if I
call the release methods now, the following exception will be thrown:
java.lang.IllegalArgumentException: can not release a model without a
document reference
at
org.eclipse.wst.sse.core.internal.FileBufferModelManager.releaseModel(FileBufferModelManager.java:668)
at
org.eclipse.wst.sse.core.internal.model.ModelManagerImpl.cleanupDiscardedModel(ModelManagerImpl.java:1449)
at
org.eclipse.wst.sse.core.internal.model.ModelManagerImpl.releaseFromRead(ModelManagerImpl.java:1353)
My code looks like this..
// create moel form string...
structuredModel = modelManager.createUnManagedStructuredModelFor
(ContentTypeIdForHTML.ContentTypeID_HTML); structuredModel.getStructuredDocument().set(mailContent);
// show dialog, let user edit, after save is clicked read the content then
currentModel.releaseFromEdit();
currentModel.releaseFromRead();
Do I have to stop calling this methods?
Klaus