KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > navigator > INavigatorPipelineService


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
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  * <p>
20  * This interface is not intended to be implemented by clients.
21  * </p>
22  *
23  * @see INavigatorContentService#getPipelineService()
24  * @see PipelinedShapeModification
25  * @see PipelinedViewerUpdate
26  * @see IPipelinedTreeContentProvider
27  * @since 3.2
28  */

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

57     public PipelinedShapeModification interceptAdd(
58             PipelinedShapeModification anAddModification);
59     
60     /**
61      * Intercept attempts to remove elements directly from the viewer.
62      *
63      * <p>
64      * For content extensions that reshape the structure of children in a
65      * viewer, their overridden extensions may sometimes use optimized refreshes
66      * to remove elements to the tree. These attempts must be intercepted and
67      * mapped to the correct set of model elements in the overridding extension.
68      * Clients may add, remove, or modify elements in the given set of removed
69      * children. Clients should return a set for downstream extensions to
70      * massage further.
71      * </p>
72      * <p>
73      * <b>Clients should not call any of the add, remove, refresh, or update
74      * methods on the viewer from this method or any code invoked by the
75      * implementation of this method.</b>
76      * </p>
77      *
78      * @param aRemoveModification
79      * The shape modification which contains the current suggested
80      * parent and children. Clients may modify this parameter
81      * directly and return it as the new shape modification.
82      * @return The new shape modification to use. Clients should <b>never</b>
83      * return <b>null</b> from this method.
84      */

85     public PipelinedShapeModification interceptRemove(
86             PipelinedShapeModification aRemoveModification);
87     
88     /**
89      * Intercept calls to viewer <code>refresh()</code> methods.
90      *
91      * <p>
92      * Clients may modify the given update to add or remove the elements to be
93      * refreshed. Clients may return the same instance that was passed in for
94      * the next downstream extension.
95      * </p>
96      *
97      * <p>
98      * <b>Clients should not call any of the add, remove, refresh, or update
99      * methods on the viewer from this method or any code invoked by the
100      * implementation of this method.</b>
101      * </p>
102      *
103      * @param aRefreshSynchronization
104      * The (current) refresh update to execute against the viewer.
105      * @return The (potentially reshaped) refresh to execute against the viewer.
106      */

107     boolean interceptRefresh(PipelinedViewerUpdate aRefreshSynchronization);
108     
109     /**
110      * Intercept calls to viewer <code>update()</code> methods.
111      *
112      * <p>
113      * Clients may modify the given update to add or remove the elements to be
114      * updated. Clients may also add or remove properties for the given targets
115      * to optimize the refresh. Clients may return the same instance that was
116      * passed in for the next downstream extension.
117      * </p>
118      *
119      * <p>
120      * <b>Clients should not call any of the add, remove, refresh, or update
121      * methods on the viewer from this method or any code invoked by the
122      * implementation of this method.</b>
123      * </p>
124      *
125      * @param anUpdateSynchronization
126      * The (current) update to execute against the viewer.
127      * @return The (potentially reshaped) update to execute against the viewer.
128      */

129     public boolean interceptUpdate(
130             PipelinedViewerUpdate anUpdateSynchronization);
131
132 }
133
Popular Tags