Capture current selection before opening dialogs in replace actions
[egit/eclipse.git] / org.eclipse.egit.core / src / org / eclipse / egit / core / internal / merge / GitResourceVariantTreeProvider.java
blob04e30379fcb86a3e15dd74f495fa6dc1bbf15bad
1 /*******************************************************************************
2 * Copyright (C) 2015, Obeo.
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
8 *******************************************************************************/
9 package org.eclipse.egit.core.internal.merge;
11 import java.util.Set;
13 import org.eclipse.core.resources.IResource;
14 import org.eclipse.team.core.variants.IResourceVariantTree;
16 /**
17 * Resource variant trees are in charge of providing the
18 * {@link org.eclipse.team.core.subscribers.Subscriber Subscribers} with
19 * resource variants, allowing them to retrieve the content of a given file in
20 * different states (remote, local, index, workspace...).
22 public interface GitResourceVariantTreeProvider {
23 /**
24 * Returns the base resource variant tree. This should provide access to the
25 * common ancestor of the "source" and "remote" resource variants.
27 * @return The base resource variant tree.
29 IResourceVariantTree getBaseTree();
31 /**
32 * Returns the remote resource variant tree. This is traditionally the
33 * remote data, or 'right' side of a comparison. In git terms, this is the
34 * "theirs" side.
36 * @return The remote resource variant tree.
38 IResourceVariantTree getRemoteTree();
40 /**
41 * Returns the source resource variant tree. This is traditionally the local
42 * data, or 'left' side of a comparison. In git terms, this is the "ours"
43 * side.
45 * @return The source resource variant tree.
47 IResourceVariantTree getSourceTree();
49 /**
50 * @return The list of root resources for which this provider's trees may
51 * hold variants.
53 Set<IResource> getRoots();
55 /**
56 * Returns the whole set of resources for which this provider's trees hold
57 * variants. The returned resources may not necessarily exist in all three
58 * underlying trees.
60 * @return The whole set of resources for which this provider's trees hold
61 * variants.
63 Set<IResource> getKnownResources();