summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2006-09-09 06:37:43 (EDT)
committerEike Stepper2006-09-09 06:37:43 (EDT)
commitf3c045a78053a5073d350314b17c589c1447c3d5 (patch)
treebf33a01269399fdd610b5e8a98aba4cf514194d5
parent5882dd47caf8a6cbd4d3486cff1f280caed67cb4 (diff)
downloadcdo-f3c045a78053a5073d350314b17c589c1447c3d5.zip
cdo-f3c045a78053a5073d350314b17c589c1447c3d5.tar.gz
cdo-f3c045a78053a5073d350314b17c589c1447c3d5.tar.bz2
[156697] Let the Migrator create the mapping extension https://bugs.eclipse.org/bugs/show_bug.cgi?id=156697
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/eclipse/ResourcesHelper.java16
1 files changed, 13 insertions, 3 deletions
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/eclipse/ResourcesHelper.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/eclipse/ResourcesHelper.java
index 62c3996..dd8737d 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/eclipse/ResourcesHelper.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/eclipse/ResourcesHelper.java
@@ -15,6 +15,8 @@ import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -31,8 +33,16 @@ import java.io.InputStream;
import java.io.InputStreamReader;
-public class ResourcesHelper
+public final class ResourcesHelper
{
+ public static final IWorkspace WS = ResourcesPlugin.getWorkspace();
+
+ public static final IWorkspaceRoot ROOT = WS.getRoot();
+
+ private ResourcesHelper()
+ {
+ }
+
public static void writeFile(IFile file, String[] content, IProgressMonitor monitor)
throws CoreException
{
@@ -133,7 +143,7 @@ public class ResourcesHelper
public static IProject ensureProject(String name) throws CoreException
{
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(name);
+ IProject project = ROOT.getProject(name);
if (!project.exists())
{
@@ -152,7 +162,7 @@ public class ResourcesHelper
{
if (container == null)
{
- container = ResourcesPlugin.getWorkspace().getRoot();
+ container = ROOT;
}
IFolder folder = container.getFolder(new Path(path));