Skip to content
Snippets Groups Projects
Commit bccc177f authored by Alexander Diewald's avatar Alexander Diewald
Browse files

CLI: Move workspace refresh for resource updates

parent 0c8c9c8f
No related branches found
No related tags found
1 merge request!1113993
CompositionUtils.java 34c0a191bd0fb4176c94b4d61abb5c88a679d5e8 GREEN
EMFResourceUtils.java 979d0e1f4f66a2b3e715d2da0ebef6493f547fd7 GREEN
EMFResourceUtils.java cce1077c902e76d701412c6538dd15d6cafb4763 YELLOW
EcoreSerializerBase.java 0a0c2969d793d2e68094c55c8f7b0a662ef6e5d5 GREEN
EcoreUtils.java 18416b5c214410a02eb35596fd807a1cc27d6b35 GREEN
ExtensionPointUtils.java 7ce63242b49eb9a7cd4eaadd223f5ebce1dfd75b GREEN
......
......@@ -15,6 +15,7 @@
+--------------------------------------------------------------------------*/
package org.fortiss.tooling.kernel.utils;
import static org.eclipse.core.resources.ResourcesPlugin.getWorkspace;
import static org.fortiss.tooling.kernel.utils.LoggingUtils.error;
import java.io.IOException;
......@@ -23,6 +24,7 @@ import java.util.Map;
import org.conqat.lib.commons.collections.Pair;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
......@@ -175,4 +177,14 @@ public final class EMFResourceUtils {
}
return null;
}
/** Refresh the workspace. */
public static void refreshWorkspace() {
try {
// refresh the workspace
getWorkspace().getRoot().refreshLocal(IResource.DEPTH_INFINITE, null);
} catch(Exception e) {
error(ToolingKernelActivator.getDefault(), "Cannot refresh workspace!", e);
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment