Skip to main content
summaryrefslogtreecommitdiffstats
blob: 6ba5bee62cd21a4d5023698ada535e801445beaa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/*******************************************************************************
 * Copyright (c) 2000, 2003 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials 
 * are made available under the terms of the Common Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/cpl-v10.html
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.team.internal.ui.synchronize;

import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.team.core.subscribers.Subscriber;
import org.eclipse.team.core.synchronize.SyncInfo;

/**
 * A refresh event generated to notify clients of the refresh lifecycle.
 */
public class RefreshEvent implements IRefreshEvent {
	int type; 
	Subscriber subscriber;
	SyncInfo[] changes;
	long startTime = 0;
	long stopTime = 0;
	IStatus status;
	IResource[] resources;
	
	public RefreshEvent(int type, IResource[] resources, Subscriber subscriber) {
		this.type = type;
		this.subscriber = subscriber;
		this.resources = resources;
	}
	
	public int getRefreshType() {
		return type;
	}

	public Subscriber getSubscriber() {
		return subscriber;
	}

	public SyncInfo[] getChanges() {
		return changes != null ? changes : new SyncInfo[0];
	}
	
	public void setChanges(SyncInfo[] changes) {
		this.changes = changes;
	}
	
	public long getStartTime() {
		return startTime;
	}

	public void setStartTime(long startTime) {
		this.startTime = startTime;
	}

	public long getStopTime() {
		return stopTime;
	}

	public void setStopTime(long stopTime) {
		this.stopTime = stopTime;
	}

	public IStatus getStatus() {
		return status;
	}
	
	public void setStatus(IStatus status) {
		this.status = status;
	}

	public IResource[] getResources() {
		return resources;
	}
}

Back to the top