1 /*******************************************************************************
2 * Copyright (C) 2008, Tor Arne Vestbø <torarnv@gmail.com>
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 * See LICENSE for the full license text, also available.
7 *******************************************************************************/
9 package org
.spearce
.egit
.ui
.internal
.decorators
;
11 import org
.eclipse
.core
.resources
.IResource
;
14 * Represents the state of a resource that can be used as a basis for decoration
16 public interface IDecoratableResource
{
19 * Set of possible staging states for a resource
22 /** Represents a resource that is not staged */
24 /** Represents a resource that has been modified */
26 /** Represents a resource that is added to Git */
28 /** Represents a resource that is removed from Git */
30 /** Represents a resource that has been renamed */
35 * Gets the type of the resource as defined by {@link IResource}
37 * @return the type of the resource
42 * Gets the name of the resource
44 * @return the name of the resource
49 * Gets the current branch of the resource if applicable
51 * @return the name of the current branch, or <code>null</code> if not
57 * Returns whether or not the resource is tracked by Git
59 * @return whether or not the resource is tracked by Git
64 * Returns whether or not the resource is ignored, either by a global team
65 * ignore in Eclipse, or by .git/info/exclude et al.
67 * @return whether or not the resource is ignored
72 * Returns whether or not the resource has changes that are not staged
74 * @return whether or not the resource is dirty
79 * Returns the staged state of the resource
81 * The set of allowed values are defined by the <code>Staged</code> enum
83 * @return the staged state of the resource
88 * Returns whether or not the resource has merge conflicts
90 * @return whether or not the resource has merge conflicts
92 boolean hasConflicts();
95 * Returns whether or not the resource is assumed valid
97 * @return whether or not the resource is assumed valid
99 boolean isAssumeValid();