diff --git a/org.eclipse.xtext/src/org/eclipse/xtext/resource/containers/StateBasedContainer.java b/org.eclipse.xtext/src/org/eclipse/xtext/resource/containers/StateBasedContainer.java index 050fb698c..4260697b7 100644 --- a/org.eclipse.xtext/src/org/eclipse/xtext/resource/containers/StateBasedContainer.java +++ b/org.eclipse.xtext/src/org/eclipse/xtext/resource/containers/StateBasedContainer.java @@ -83,7 +83,7 @@ public class StateBasedContainer extends ResourceDescriptionsBasedContainer { @Override public Iterable getResourceDescriptions() { - if (state.getContents().isEmpty()) + if (isEmpty()) return Collections.emptyList(); return getUriToDescription().values(); } @@ -101,28 +101,28 @@ public class StateBasedContainer extends ResourceDescriptionsBasedContainer { @Override public Iterable getExportedObjects() { - if (state.getContents().isEmpty()) + if (isEmpty()) return emptyList(); return super.getExportedObjects(); } @Override public Iterable getExportedObjectsByType(EClass type) { - if (state.getContents().isEmpty()) + if (isEmpty()) return emptyList(); return super.getExportedObjectsByType(type); } @Override public Iterable getExportedObjectsByObject(EObject object) { - if (state.getContents().isEmpty()) + if (isEmpty()) return emptyList(); return super.getExportedObjectsByObject(object); } @Override public Iterable getExportedObjects(EClass type, QualifiedName qualifiedName, boolean ignoreCase) { - if (state.getContents().isEmpty()) + if (isEmpty()) return emptyList(); return super.getExportedObjects(type, qualifiedName, ignoreCase); }