System.out.println("finalizeAfterVEditorDB(), memento is "+((memento==null)?"NULL":"not NULL"));
if(memento!=null){
toolSequence.restoreCurrentStates(memento);// restore states and recalc "dirty" flags - should be after tools themselves
}
if(selectedResource!=null)toolSequence.restoreCurrentStates(selectedResource.getProject());// restore states and recalc "dirty" flags - should be after tools themselves
// this may need some synchronization as saveState(IMemento memento) is called by the timer (what if selectedResource changes while save is in progress?