if (!getCodeFile().exists()) {
return;
}
ScriptMetadata metaData = (ScriptMetadata) readMetaData();
String code = readCode(metaData);
WGCSSJSModule mod = (WGCSSJSModule) db.getDocumentByDocumentKey(getDocumentKey());
if (mod == null) {
WGDocumentKey key = new WGDocumentKey(getDocumentKey());
mod = db.createCSSJSModule(key.getName(), getCodeType());
}
mod.setCode(code);
metaData.writeToDocument(mod);
doSaveDocument(mod);
resetUpdateInformation();
}