Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Constant2019-06-07 15:26:58 -0400
committerOlivier Constant2019-06-10 03:47:16 -0400
commit964be68fd388d51960d26e69ba8f6a8d33cf120c (patch)
tree3b036ebbb4f9da609f0b8dff36530a84d42255df
parent19aab425d7da198c151be6fc88c0e5ceed3c0f4a (diff)
downloadorg.eclipse.emf.diffmerge.core-964be68fd388d51960d26e69ba8f6a8d33cf120c.tar.gz
org.eclipse.emf.diffmerge.core-964be68fd388d51960d26e69ba8f6a8d33cf120c.tar.xz
org.eclipse.emf.diffmerge.core-964be68fd388d51960d26e69ba8f6a8d33cf120c.zip
Bug 548073 - Git connector does not compile against EGit 5.4.0
Change-Id: I3b8a6794518929ede0639d34d8f8642920e5e4b8 Signed-off-by: Olivier Constant <olivier.constant@thalesgroup.com>
-rw-r--r--plugins/org.eclipse.emf.diffmerge.connector.git/src/org/eclipse/emf/diffmerge/connector/git/ext/GitHelper.java8
-rw-r--r--plugins/org.eclipse.emf.diffmerge.connector.git/src/org/eclipse/emf/diffmerge/connector/git/ext/GitIndexRevisionScopeDefinitionFactory.java25
2 files changed, 0 insertions, 33 deletions
diff --git a/plugins/org.eclipse.emf.diffmerge.connector.git/src/org/eclipse/emf/diffmerge/connector/git/ext/GitHelper.java b/plugins/org.eclipse.emf.diffmerge.connector.git/src/org/eclipse/emf/diffmerge/connector/git/ext/GitHelper.java
index 506e1ba6..d53f2c22 100644
--- a/plugins/org.eclipse.emf.diffmerge.connector.git/src/org/eclipse/emf/diffmerge/connector/git/ext/GitHelper.java
+++ b/plugins/org.eclipse.emf.diffmerge.connector.git/src/org/eclipse/emf/diffmerge/connector/git/ext/GitHelper.java
@@ -17,14 +17,12 @@ import java.io.IOException;
import java.util.Arrays;
import java.util.Collection;
-import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
import org.eclipse.egit.core.Activator;
import org.eclipse.egit.core.project.RepositoryMapping;
-import org.eclipse.egit.ui.internal.revision.LocalFileRevision;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.diffmerge.connector.git.EMFDiffMergeGitConnectorPlugin;
import org.eclipse.emf.diffmerge.connector.git.Messages;
@@ -101,9 +99,6 @@ public final class GitHelper {
IPath revisionPath = toPath(revision_p);
if (revisionPath != null && !revisionPath.isAbsolute()) {
return getRepository(revisionPath);
- } else if (revision_p instanceof LocalFileRevision) {
- IFile file = ((LocalFileRevision)revision_p).getFile();
- return getRepository(file.getFullPath());
}
EMFDiffMergeGitConnectorPlugin.getDefault().getLog().log(new Status(IStatus.ERROR,
EMFDiffMergeGitConnectorPlugin.getDefault().getPluginId(),
@@ -170,9 +165,6 @@ public final class GitHelper {
IPath revisionPath = toPath(revision_p);
if (!revisionPath.isAbsolute()) {
return isConflicting(repository_p, revisionPath.toString());
- } else if (revision_p instanceof LocalFileRevision) {
- IFile file = ((LocalFileRevision)revision_p).getFile();
- return isConflicting(repository_p, file.getFullPath().makeRelative().toString());
}
EMFDiffMergeGitConnectorPlugin.getDefault().getLog().log(new Status(IStatus.ERROR,
EMFDiffMergeGitConnectorPlugin.getDefault().getPluginId(),
diff --git a/plugins/org.eclipse.emf.diffmerge.connector.git/src/org/eclipse/emf/diffmerge/connector/git/ext/GitIndexRevisionScopeDefinitionFactory.java b/plugins/org.eclipse.emf.diffmerge.connector.git/src/org/eclipse/emf/diffmerge/connector/git/ext/GitIndexRevisionScopeDefinitionFactory.java
index efa8a2b5..823fdfea 100644
--- a/plugins/org.eclipse.emf.diffmerge.connector.git/src/org/eclipse/emf/diffmerge/connector/git/ext/GitIndexRevisionScopeDefinitionFactory.java
+++ b/plugins/org.eclipse.emf.diffmerge.connector.git/src/org/eclipse/emf/diffmerge/connector/git/ext/GitIndexRevisionScopeDefinitionFactory.java
@@ -22,10 +22,8 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.egit.core.internal.storage.IndexFileRevision;
import org.eclipse.egit.ui.internal.revision.EditableRevision;
-import org.eclipse.egit.ui.internal.revision.LocalFileRevision;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.diffmerge.connector.core.ext.AbstractRevisionScopeDefinitionFactory;
-import org.eclipse.emf.diffmerge.connector.core.ext.LocalHistoryURIConverter;
import org.eclipse.emf.diffmerge.connector.git.EMFDiffMergeGitConnectorPlugin;
import org.eclipse.emf.diffmerge.connector.git.Messages;
import org.eclipse.emf.ecore.resource.URIConverter;
@@ -57,10 +55,6 @@ public class GitIndexRevisionScopeDefinitionFactory extends AbstractRevisionScop
Messages.GitIndexRevisionScopeDefinitionFactory_LabelIndexReadOnly,
revision_p.getName());
}
- } else if (revision_p instanceof LocalFileRevision) {
- result = String.format(
- Messages.GitIndexRevisionScopeDefinitionFactory_LabelLocal,
- getLocalFileRevisionPath((LocalFileRevision)revision_p));
}
}
if (result == null)
@@ -69,15 +63,6 @@ public class GitIndexRevisionScopeDefinitionFactory extends AbstractRevisionScop
}
/**
- * Return the path of the given local file revision
- * @param revision_p a non-null object
- * @return a non-null object
- */
- protected String getLocalFileRevisionPath(LocalFileRevision revision_p) {
- return revision_p.getFile().getFullPath().toString();
- }
-
- /**
* @see org.eclipse.emf.diffmerge.connector.core.ext.AbstractRevisionScopeDefinitionFactory#getRevision(org.eclipse.compare.ITypedElement)
*/
@Override
@@ -112,14 +97,6 @@ public class GitIndexRevisionScopeDefinitionFactory extends AbstractRevisionScop
EMFDiffMergeGitConnectorPlugin.getDefault().getPluginId(), e.getMessage(), e));
}
}
- if (revision_p instanceof LocalFileRevision) {
- String fullPath = getLocalFileRevisionPath((LocalFileRevision)revision_p);
- // Local history or current
- final long timestamp = revision_p.getTimestamp();
- if (timestamp != -1) {
- return new LocalHistoryURIConverter(timestamp, fullPath);
- }
- }
return null;
}
@@ -143,8 +120,6 @@ public class GitIndexRevisionScopeDefinitionFactory extends AbstractRevisionScop
EMFDiffMergeGitConnectorPlugin.getDefault().getLog().log(new Status(IStatus.ERROR,
EMFDiffMergeGitConnectorPlugin.getDefault().getPluginId(), e.getMessage(), e));
}
- } else if (revision_p instanceof LocalFileRevision) {
- result = URI.createPlatformResourceURI(getLocalFileRevisionPath((LocalFileRevision)revision_p), true);
}
return result;
}

Back to the top