// Check if file has been deleted in the meantime
if (!getCodeFile().exists()) {
return;
}
TMLMetadata metaData = (TMLMetadata) readMetaData();
String code = readCode(metaData);
WGTMLModule mod = (WGTMLModule) db.getDocumentByDocumentKey(getDocumentKey());
if (mod == null) {
WGDocumentKey key = new WGDocumentKey(getDocumentKey());
mod = db.createTMLModule(key.getName(), key.getMediakey());
}
mod.setCode(code);
metaData.writeToDocument(mod);
doSaveDocument(mod);
resetUpdateInformation();
}