use of org.eclipse.wst.sse.core.internal.NullMemento in project webtools.sourceediting by eclipse.
the class ModelManagerImpl method createStructuredDocumentFor.
/**
* Convenience method. This method can be used when the resource does not
* really exist (e.g. when content is being created, but hasn't been
* written to disk yet). Note that since the content is being provided as
* a String, it is assumed to already be decoded correctly so no
* transformation is done.
*/
public IStructuredDocument createStructuredDocumentFor(String filename, String content, URIResolver resolver) throws IOException {
IDocumentLoader loader = null;
IModelHandler handler = calculateType(filename, null);
loader = handler.getDocumentLoader();
IStructuredDocument result = (IStructuredDocument) loader.createNewStructuredDocument();
result.setEncodingMemento(new NullMemento());
result.setText(this, content);
return result;
}
Aggregations