KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > team > ui > mapping > ITeamStateChangeEvent


1 /*******************************************************************************
2  * Copyright (c) 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.ui.mapping;
12
13 import org.eclipse.core.resources.IResource;
14 import org.eclipse.team.ui.synchronize.TeamStateChangeEvent;
15
16 /**
17  * A description of the team state changes that have occurred. This event
18  * indicates the resources for which the team state may have changed.
19  * However, it may be the case that the state did not actually change. Clients
20  * that wish to determine if the state ha changed must cache the previous state
21  * and re-obtain the state when they receive this event. Also, the event may
22  * not include team state changes that resulted from local changes. Clients should listen
23  * for resource changes as well.
24  * <p>
25  * This interface is not intended to be implemented by clients. Clients should
26  * instead use {@link TeamStateChangeEvent}.
27  *
28  * @see ITeamStateChangeListener
29  * @see ITeamStateProvider
30  * @see TeamStateChangeEvent
31  *
32  * @since 3.2
33  */

34 public interface ITeamStateChangeEvent {
35     
36     /**
37      * Return the set of resources that were previously undecorated
38      * but are now decorated.
39      * @return the set of resources that were previously undecorated
40      * but are now decorated.
41      */

42     public IResource[] getAddedRoots();
43     
44     /**
45      * Return the set of resources that were previously decorated
46      * but are now undecorated.
47      * @return the set of resources that were previously decorated
48      * but are now undecorated.
49      */

50     public IResource[] getRemovedRoots();
51     
52     /**
53      * Return the set of resources whose decorated state has changed.
54      * @return the set of resources whose decorated state has changed.
55      */

56     public IResource[] getChangedResources();
57     
58     /**
59      * Return whether the resource has any state changes. This returns
60      * <code>true</code> if the resource is included in the set
61      * of changes returned by {@link #getChangedResources()} or
62      * if it is a descendant of a root that is present in a set
63      * returned by {@link #getAddedRoots()} or {@link #getRemovedRoots()}.
64      *
65      * @param resource the resource
66      * @return whether the resource has any state changes
67      */

68     public boolean hasChange(IResource resource);
69     
70 }
71
Popular Tags