NbEditorDocument doc = (NbEditorDocument) UpdateNodeTask.getInstance().getLastDocument();//lastResult.getSnapshot().getSource().getDocument(false);// ElementProvider.getInstance().getEditorCookie();//TopComponent.getRegistry().getActivated().getLookup().lookup(EditorCookie.class);
LyDataObject o = (LyDataObject) doc.getDocumentProperties().get("stream");
SaveCookie sv = o.getCookie(SaveCookie.class);
if (sv != null) {
sv.save();
}
lyFileName = o.getPrimaryFile().getPath();
//remove old
out = LilyOptions.getTempDir();
try {