01: /*******************************************************************************
02: * Copyright (c) 2003, 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.progress;
11:
12: import org.eclipse.core.runtime.IProgressMonitor;
13:
14: /**
15: * IElementCollector is a type that allows for the incremental update of a
16: * collection of objects. This used for updating trees incrementally with
17: * a progress monitor so that the update can be reported.
18: *
19: * @see org.eclipse.ui.progress.IDeferredWorkbenchAdapter
20: * @see org.eclipse.ui.progress.DeferredTreeContentManager
21: * @since 3.0
22: */
23: public interface IElementCollector {
24: /**
25: * Add the element to the IElementCollector. Send any progress information
26: * to monitor.
27: *
28: * @param element
29: * The element being added
30: * @param monitor
31: * The monitor to send updates to.
32: */
33: public void add(Object element, IProgressMonitor monitor);
34:
35: /**
36: * Add the elements to the IElementCollector. Send any progress information
37: * to monitor.
38: *
39: * @param elements
40: * The elements being added
41: * @param monitor
42: * The monitor to send updates to.
43: */
44: public void add(Object[] elements, IProgressMonitor monitor);
45:
46: /**
47: * The element collection is done. Clean up any temporary state.
48: *
49: */
50: public void done();
51: }
|