Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Roldan Betancort2013-08-19 09:03:54 +0000
committerMikaƫl Barbero2013-08-19 12:27:37 +0000
commit6ecb0feb2954575d2b516762484b3bc495e3d716 (patch)
tree571ffcb3329ac2e514dc147fe5d89bccc4819bc4
parent62a9ecf0acf7f5a871fb134c5f44f0183658d705 (diff)
downloadorg.eclipse.emf.compare-6ecb0feb2954575d2b516762484b3bc495e3d716.tar.gz
org.eclipse.emf.compare-6ecb0feb2954575d2b516762484b3bc495e3d716.tar.xz
org.eclipse.emf.compare-6ecb0feb2954575d2b516762484b3bc495e3d716.zip
[412088] NPE in CVS Team Support due to EMFResourceMapping
Bug: 412088 Change-Id: I7b48dd1f08a1a5fcd3a6f70f6b88981f3ab38dfd (cherry picked from commit fa51d2e0021b3b7f33d7de4a5da2129aed1cff84) Conflicts: plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/EMFResourceMapping.java Signed-off-by: Victor Roldan Betancort <vroldan@opencanarias.com>
-rw-r--r--plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/EMFResourceMapping.java13
1 files changed, 4 insertions, 9 deletions
diff --git a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/EMFResourceMapping.java b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/EMFResourceMapping.java
index 17ee540d8..4e653d618 100644
--- a/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/EMFResourceMapping.java
+++ b/plugins/org.eclipse.emf.compare.ide.ui/src/org/eclipse/emf/compare/ide/ui/internal/logical/EMFResourceMapping.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012, 2013 Obeo.
+ * Copyright (c) 2012, 2013 Obeo and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -14,7 +14,6 @@ import static com.google.common.base.Preconditions.checkNotNull;
import com.google.common.collect.Sets;
-import java.util.Collections;
import java.util.Set;
import org.eclipse.core.resources.IFile;
@@ -26,9 +25,8 @@ import org.eclipse.core.resources.mapping.ResourceTraversal;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.emf.compare.ide.utils.ResourceUtil;
+import org.eclipse.emf.compare.ide.ui.internal.EMFCompareIDEUIPlugin;
import org.eclipse.emf.compare.ide.utils.StorageTraversal;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
/**
* This will be used to represent an EMF resource's mapping. It will allow us to properly resolve the whole
@@ -68,10 +66,7 @@ public class EMFResourceMapping extends ResourceMapping {
*/
@Override
public Object getModelObject() {
- if (file.exists()) {
- return ResourceUtil.loadResource(file, new ResourceSetImpl(), Collections.emptyMap());
- }
- return new Object();
+ return file;
}
/**
@@ -118,7 +113,7 @@ public class EMFResourceMapping extends ResourceMapping {
* detecting a traversal for a file that's been removed locally but is present on the repository is
* not necessary at this point.
*/
- return EMFSynchronizationModel.resolveTraversal(file, monitor);
+ return EMFSynchronizationModel.resolveTraversal(file, monitor);
}
/**

Back to the top