mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
improve error report
This commit is contained in:
+8
@@ -121,6 +121,14 @@ public abstract class DummyCachingFileSystem<T extends VirtualFile> extends Dumm
|
||||
return list == null || list.size() > 1 ? null : list.get(0);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public Project getProjectOrFail(String projectId) {
|
||||
List<Project> list = myProject2Id.getKeysByValue(projectId);
|
||||
if (list == null || list.isEmpty()) throw new AssertionError(projectId + " project not found: " + myProject2Id.values());
|
||||
if (list.size() != 1) throw new AssertionError(projectId + " is mapped to several projects: " + list);
|
||||
return list.get(0);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public Collection<T> getCachedFiles() {
|
||||
return myCachedFiles.notNullValues();
|
||||
|
||||
Reference in New Issue
Block a user