blob: ce859a8255e0cacf1b03db4036fb3c9b7f31d81d (
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
/*******************************************************************************
* Copyright (c) 2000, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.team.internal.ui.synchronize;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.viewers.StructuredViewer;
import org.eclipse.jface.viewers.ViewerSorter;
import org.eclipse.team.core.synchronize.SyncInfoSet;
import org.eclipse.team.internal.ui.TeamUIPlugin;
import org.eclipse.team.ui.synchronize.ISynchronizeModelElement;
/**
* This class represents provisional API. A provider is not required to
* implement this API. Implementers, and those who reference it, do so with the
* awareness that this class may be removed or substantially changed at future
* times without warning.
*/
public interface ISynchronizeModelProvider {
/**
* Property constant used to indicate that the viewer sorter has changed.
* Property change notifications for the viewer sorter change do not include
* the old and new viewer sorter. Instead, clients should re-obtain the sorter
* from the provider.
*/
public static final String P_VIEWER_SORTER = TeamUIPlugin.ID + ".P_VIEWER_SORTER"; //$NON-NLS-1$
/**
* Returns the sync set this model provider is showing.
* @return the sync set this model provider is showing.
*/
public abstract SyncInfoSet getSyncInfoSet();
/**
* Returns the description for this model provider.
* @return the description for this model provider.
*/
public ISynchronizeModelProviderDescriptor getDescriptor();
/**
* Return the <code>AbstractTreeViewer</code> associated with this content
* provider or <code>null</code> if the viewer is not of the proper type.
* @return the viewer
*/
public abstract StructuredViewer getViewer();
/**
* Builds the viewer model based on the contents of the sync set.
* @param monitor the progress monitor
* @return the root element of the generated model.
*/
public abstract ISynchronizeModelElement prepareInput(IProgressMonitor monitor);
/**
* Dispose of the builder
*/
public abstract void dispose();
/**
* Returns the input created by this controller or <code>null</code> if
* {@link #prepareInput(IProgressMonitor)} hasn't been called on this object yet.
* @return the model element
*/
public abstract ISynchronizeModelElement getModelRoot();
/**
* Returns the sorter for this model.
* @return the sorter for this model.
*/
public abstract ViewerSorter getViewerSorter();
/**
* Allows the provider to save state. Is usually called before provider is disposed and it
* is safe to access the viewer.
*/
public abstract void saveState();
/**
* Register a property change listener with this provider.
* @param listener the property change listener
*/
public abstract void addPropertyChangeListener(IPropertyChangeListener listener);
/**
* Remove a property change listener from this provider.
* @param listener the property change listener
*/
public abstract void removePropertyChangeListener(IPropertyChangeListener listener);
}
|