KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > team > core > mapping > IMergeStatus


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.team.core.mapping;
12
13 import org.eclipse.core.resources.IFile;
14 import org.eclipse.core.resources.mapping.ResourceMapping;
15 import org.eclipse.core.runtime.IStatus;
16 import org.eclipse.team.core.mapping.provider.MergeStatus;
17
18 /**
19  * A special status that is returned when the return code
20  * of the <code>merge</code> method is <code>CONFLICTS</code>.
21  * It is possible that there were problems that caused the
22  * auto-merge to fail. In that case, the implementor of
23  * <code>IResourceMappingMerger</code> can return a multi-status
24  * in which one of the children is a <code>MergeStatus</code> and
25  * the others describe other problems that were encountered.
26  * <p>
27  * This interface is not intended to be implemented by clients.
28  *
29  * @see org.eclipse.team.core.mapping.IResourceMappingMerger
30  * @see MergeStatus
31  *
32  * @since 3.2
33  */

34 public interface IMergeStatus extends IStatus {
35
36     /**
37      * Indicates that a change conflict prevented some or all of the resource
38      * mappings to be merged (value <code>1</code>). When this code is
39      * returned, the status must be of type
40      * <code>MergeStatus</code> and must contain the list of all
41      * resource mappings for which a manual merge is required.
42      */

43     public static final int CONFLICTS = 1;
44
45     /**
46      * Status code describing an internal error (value <code>2</code>).
47      * The status return is not required to be of type <code>MergeStatus</code>
48      * for internal errors.
49      */

50     public static final int INTERNAL_ERROR = 2;
51
52     /**
53      * Returns the set of resource mappings for which an auto-merge was
54      * not performed. If the code of the status is <code>CONFLICTS</code>
55      * the status may contain a set of mappings or files depending
56      * on what method returned the status.
57      * @return the set of resource mappings for which an auto-merge was
58      * not performed.
59      */

60     public abstract ResourceMapping[] getConflictingMappings();
61
62     /**
63      * Returns the set of file for which an auto-merge was
64      * not performed. If the code of the status is <code>CONFLICTS</code>
65      * the status may contain a set of mappings or files depending
66      * on what method returned the status.
67      * @return the set of files for which an auto-merge was
68      * not performed.
69      */

70     public abstract IFile[] getConflictingFiles();
71
72 }
73
Popular Tags