KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*******************************************************************************
2  * Copyright (c) 2006, 2007 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.IProject;
15 import org.eclipse.core.runtime.CoreException;
16
17 /**
18  * Interface used to allow model tooling to request that a particular set of modified files
19  * be committed together to the repository. It is used by the {@link ChangeTracker} class to
20  * track changes and request that they be grouped when appropriate. Clients may obtain an
21  * instance of this interface from a repository provider plug-in using the adapter manager in the
22  * following way:
23  * <pre>
24  * RepositoryProvderType type = ....
25  * Object o = type.getAdapter(IChangeGroupingRequestor.class);
26  * if (o instanceof IChangeGroupingRequestor) {
27  * return (IChangeGroupingRequestor) o;
28  * }
29  * </pre>
30  * <p>
31  * Clients may implement this interface.
32  * </p>
33  * @see ChangeTracker
34  * @since 3.3
35  */

36 public interface IChangeGroupingRequestor {
37     
38     /**
39      * Issue a request to group the provided files together when the changes
40      * are committed or checked-in to the repository.
41      * @param project the project that contains the files
42      * @param files the files
43      * @param nameHint a name hint for the resulting set
44      * @throws CoreException if an error occurs
45      */

46     public void ensureChangesGrouped(IProject project, IFile[] files, String JavaDoc nameHint) throws CoreException;
47
48     /**
49      * Return whether the given file is modified with respect to the repository.
50      * In other words, return whether the file contains changes that need to be committed
51      * or checked-in to the repository.
52      * @param file the file
53      * @return whether the given file is modified with respect to the repository
54      * @throws CoreException if an error occurs while trying to determine the modification state
55      * of the file
56      */

57     public boolean isModified(IFile file) throws CoreException;
58     
59 }
60
Popular Tags