/** * Mark the workflow as synchronized by saving to given file. * Concurrent calls to hasChanged() will return false until * the workflow model is changed. Calls to lastFilename() will * return the given file unless the workflow is later syncedWithFile() * with some other file. * * @param workflow ScuflModel that has been synchronized * @param file File where the workflow has been stored */ public void syncedWithFile(ScuflModel workflow, File file) { filenames.put(workflow, file); synced(workflow); }
WorkflowChanges.getInstance().syncedWithFile(model, file); } else { WorkflowChanges.getInstance().synced(model);
public void modelAdded(final ScuflModel workflow) { ChangedModelListener listener = new ChangedModelListener(workflow); listeners.put(workflow, listener); workflow.addListener(listener); synced(workflow); // initially unchanged }