added api to force load of known resource uri and get the resource using the resource URI
diff --git a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/ArtifactEdit.java b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/ArtifactEdit.java
index bbe486e..4931ce0 100644
--- a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/ArtifactEdit.java
+++ b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/ArtifactEdit.java
@@ -8,6 +8,8 @@
**************************************************************************************************/
package org.eclipse.wst.common.componentcore;
+import java.util.List;
+
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.emf.common.command.CommandStack;
@@ -484,4 +486,24 @@
public boolean isReadOnly() {
return isReadOnly;
}
+
+/**
+ * Force all of the known resource URIs to be loaded
+ * if they are not already.
+ */
+ public void forceLoadKnownResources() {
+ List uris = getArtifactEditModel().getKnownResourceUris();
+ URI uri = null;
+ for (int i = 0; i < uris.size(); i++) {
+ uri = (URI) uris.get(i);
+ getArtifactEditModel().getResource(uri);
+ }
+ }
+
+ /**
+ * Return a Resource for @aUri.
+ */
+ public Resource getResource(URI aUri) {
+ return getArtifactEditModel().getResource(aUri);
+ }
}
\ No newline at end of file