long (final VirtualFile[] files, Project myProject) { long timestamp = 0; for(VirtualFile file:files) { if (file == null || !file.isValid()) break; final PsiFile psifile = PsiManager.getInstance(myProject).findFile(file); if (psifile != null && psifile.isValid()) { timestamp += psifile.getViewProvider().getModificationStamp(); } else { break; } } return timestamp; }