Project

General

Profile

Download (5.03 KB) Statistics
| Branch: | Tag: | Revision:
1
/*******************************************************************************
2
 * Copyright (c) 2006, 2010 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

    
12
package org.eclipse.ui.navigator;
13

    
14
/**
15
 * 
16
 * Performs calculations that are necessary to determine the correct children to
17
 * render in the viewer.
18
 * 
19
 * @see INavigatorContentService#getPipelineService()
20
 * @see PipelinedShapeModification
21
 * @see PipelinedViewerUpdate
22
 * @see IPipelinedTreeContentProvider
23
 * 
24
 * @noimplement This interface is not intended to be implemented by clients.
25
 * @noextend This interface is not intended to be extended by clients.
26
 * @since 3.2
27
 */
28
public interface INavigatorPipelineService {
29

    
30
	/**
31
	 * Intercept attempts to add elements directly to the viewer.
32
	 * 
33
	 * <p>
34
	 * For content extensions that reshape the structure of children in a
35
	 * viewer, their overridden extensions may sometimes use optimized refreshes
36
	 * to add elements to the tree. These attempts must be intercepted and
37
	 * mapped to the correct set of model elements in the overriding extension.
38
	 * Clients may add, remove, or modify elements in the given set of added
39
	 * children. Clients should return a set for downstream extensions to
40
	 * massage further.
41
	 * </p>
42
	 * <p>
43
	 * <b>Clients should not call any of the add, remove, refresh, or update
44
	 * methods on the viewer from this method or any code invoked by the
45
	 * implementation of this method.</b>
46
	 * </p>
47
	 * 
48
	 * @param anAddModification
49
	 *            The shape modification which contains the current suggested
50
	 *            parent and children. Clients may modify this parameter
51
	 *            directly and return it as the new shape modification.
52
	 * @return The new shape modification to use. Clients should <b>never</b>
53
	 *         return <b>null</b> from this method.
54
	 */
55
	public PipelinedShapeModification interceptAdd(
56
			PipelinedShapeModification anAddModification);
57

    
58
	/**
59
	 * Intercept attempts to remove elements directly from the viewer.
60
	 * 
61
	 * <p>
62
	 * For content extensions that reshape the structure of children in a
63
	 * viewer, their overridden extensions may sometimes use optimized refreshes
64
	 * to remove elements to the tree. These attempts must be intercepted and
65
	 * mapped to the correct set of model elements in the overriding extension.
66
	 * Clients may add, remove, or modify elements in the given set of removed
67
	 * children. Clients should return a set for downstream extensions to
68
	 * massage further.
69
	 * </p>
70
	 * <p>
71
	 * <b>Clients should not call any of the add, remove, refresh, or update
72
	 * methods on the viewer from this method or any code invoked by the
73
	 * implementation of this method.</b>
74
	 * </p>
75
	 * 
76
	 * @param aRemoveModification
77
	 *            The shape modification which contains the current suggested
78
	 *            parent and children. Clients may modify this parameter
79
	 *            directly and return it as the new shape modification.
80
	 * @return The new shape modification to use. Clients should <b>never</b>
81
	 *         return <b>null</b> from this method.
82
	 */
83
	public PipelinedShapeModification interceptRemove(
84
			PipelinedShapeModification aRemoveModification);
85
	
86
	/**
87
	 * Intercept calls to viewer <code>refresh()</code> methods.
88
	 * 
89
	 * <p>
90
	 * Clients may modify the given update to add or remove the elements to be
91
	 * refreshed. Clients may return the same instance that was passed in for
92
	 * the next downstream extension.
93
	 * </p>
94
	 * 
95
	 * <p>
96
	 * <b>Clients should not call any of the add, remove, refresh, or update
97
	 * methods on the viewer from this method or any code invoked by the
98
	 * implementation of this method.</b>
99
	 * </p>
100
	 * 
101
	 * @param aRefreshSynchronization
102
	 *            The (current) refresh update to execute against the viewer.
103
	 * @return The (potentially reshaped) refresh to execute against the viewer.
104
	 */
105
	boolean interceptRefresh(PipelinedViewerUpdate aRefreshSynchronization);
106
	
107
	/**
108
	 * Intercept calls to viewer <code>update()</code> methods.
109
	 * 
110
	 * <p>
111
	 * Clients may modify the given update to add or remove the elements to be
112
	 * updated. Clients may also add or remove properties for the given targets
113
	 * to optimize the refresh. Clients may return the same instance that was
114
	 * passed in for the next downstream extension.
115
	 * </p>
116
	 * 
117
	 * <p>
118
	 * <b>Clients should not call any of the add, remove, refresh, or update
119
	 * methods on the viewer from this method or any code invoked by the
120
	 * implementation of this method.</b>
121
	 * </p>
122
	 * 
123
	 * @param anUpdateSynchronization
124
	 *            The (current) update to execute against the viewer.
125
	 * @return The (potentially reshaped) update to execute against the viewer.
126
	 */
127
	public boolean interceptUpdate(
128
			PipelinedViewerUpdate anUpdateSynchronization);
129

    
130
}
(33-33/49)