From 7231e69ff2d1b809f5b754a0bb778765d0b23bbd Mon Sep 17 00:00:00 2001 From: Thomas Wolf Date: Mon, 12 Feb 2018 09:39:18 +0100 Subject: [PATCH] Remove unused classes Remove two unused classes that were left over from an earlier attempt by emf.compare to move some things to EGit. That attempt has since then been superseded by the mergeStrategy extension point, and emf.compare does not use these two internal classes. Change-Id: I61735b7ac9a362c4d3150fb4e9bccd7d2ce686b6 Signed-off-by: Thomas Wolf --- .../internal/storage/IndexResourceVariant.java | 54 -------------------- .../storage/TreeParserResourceVariant.java | 58 ---------------------- 2 files changed, 112 deletions(-) delete mode 100644 org.eclipse.egit.core/src/org/eclipse/egit/core/internal/storage/IndexResourceVariant.java delete mode 100644 org.eclipse.egit.core/src/org/eclipse/egit/core/internal/storage/TreeParserResourceVariant.java diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/storage/IndexResourceVariant.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/storage/IndexResourceVariant.java deleted file mode 100644 index bd289e5e9..000000000 --- a/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/storage/IndexResourceVariant.java +++ /dev/null @@ -1,54 +0,0 @@ -/******************************************************************************* - * Copyright (C) 2015, Obeo. - * - * 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 - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.egit.core.internal.storage; - -import org.eclipse.core.resources.IStorage; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.jgit.dircache.DirCacheEntry; -import org.eclipse.jgit.lib.FileMode; -import org.eclipse.jgit.lib.ObjectId; -import org.eclipse.jgit.lib.Repository; -import org.eclipse.team.core.TeamException; - -/** - * Implementation of a resource variant populated through a Repository's - * DirCache information. - */ -public class IndexResourceVariant extends AbstractGitResourceVariant { - private IndexResourceVariant(Repository repository, String path, - boolean isContainer, ObjectId objectId, int rawMode) { - super(repository, path, isContainer, objectId, rawMode); - } - - /** - * Constructs a resource variant corresponding to the given DirCache entry. - * - * @param repository - * Repository from which this DirCacheEntry was extracted. - * @param entry - * The DirCacheEntry for which content we need an - * IResourceVariant. - * @return The created variant. - */ - public static IndexResourceVariant create(Repository repository, - DirCacheEntry entry) { - final String path = entry.getPathString(); - final boolean isContainer = FileMode.TREE.equals(entry.getFileMode()); - final ObjectId objectId = entry.getObjectId(); - final int rawMode = entry.getRawMode(); - - return new IndexResourceVariant(repository, path, isContainer, - objectId, rawMode); - } - - @Override - public IStorage getStorage(IProgressMonitor monitor) throws TeamException { - return new IndexBlobStorage(repository, path, objectId); - } -} diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/storage/TreeParserResourceVariant.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/storage/TreeParserResourceVariant.java deleted file mode 100644 index f4dfa869e..000000000 --- a/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/storage/TreeParserResourceVariant.java +++ /dev/null @@ -1,58 +0,0 @@ -/******************************************************************************* - * Copyright (C) 2015, Obeo. - * - * 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 - * http://www.eclipse.org/legal/epl-v10.html - *******************************************************************************/ -package org.eclipse.egit.core.internal.storage; - -import org.eclipse.core.resources.IStorage; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.egit.core.storage.GitBlobStorage; -import org.eclipse.jgit.lib.FileMode; -import org.eclipse.jgit.lib.ObjectId; -import org.eclipse.jgit.lib.Repository; -import org.eclipse.jgit.treewalk.CanonicalTreeParser; -import org.eclipse.team.core.TeamException; - -/** - * Implementation of a resource variant populated through a CanonicalTreeParser. - * This can provide access to local resources as well as their remote variants. - */ -public class TreeParserResourceVariant extends AbstractGitResourceVariant { - private TreeParserResourceVariant(Repository repository, String path, - boolean isContainer, ObjectId objectId, int rawMode) { - super(repository, path, isContainer, objectId, rawMode); - } - - /** - * Constructs a resource variant corresponding to the current entry of the - * given CanonicalTreeParser. - * - * @param repository - * Repository from which this CanonicalTreeParser was created. - * @param treeParser - * A CanonicalTreeParser to retrieve information from. This will - * only read information about the current entry on which this - * parser is positioned and will not change its state. - * @return The created variant. - */ - public static TreeParserResourceVariant create(Repository repository, - CanonicalTreeParser treeParser) { - final String path = treeParser.getEntryPathString(); - final boolean isContainer = FileMode.TREE.equals(treeParser - .getEntryFileMode()); - final ObjectId objectId = treeParser.getEntryObjectId(); - final int rawMode = treeParser.getEntryRawMode(); - - return new TreeParserResourceVariant(repository, path, isContainer, - objectId, rawMode); - } - - @Override - public IStorage getStorage(IProgressMonitor monitor) throws TeamException { - return new GitBlobStorage(repository, path, objectId); - } -} -- 2.11.4.GIT