01: /*******************************************************************************
02: * Copyright (c) 2006 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;
11:
12: import org.eclipse.core.runtime.IAdaptable;
13:
14: /**
15: * <p>
16: * Interface that describes a mechanism that may be provided by working set
17: * extensions to help manage the addition of elements to working sets. Instances
18: * of this class are capable of transforming possible working set content into
19: * the most applicable form.
20: * </p>
21: *
22: * <p>
23: * Usage of this interface is achieved via the <code>elementAdapterClass</code>
24: * attribute of the <code>org.eclipse.ui.workingSets</code> extension point.
25: * Usage of this interface in <code>org.eclipse.ui.workingSets</code>
26: * extensions is optional.
27: * </p>
28: *
29: * @since 3.3
30: */
31: public interface IWorkingSetElementAdapter {
32:
33: /**
34: * Converts the given elements for addition to/removal from the working set.
35: *
36: * @param ws
37: * the target working set that elements should be adapted for
38: * @param elements
39: * the elements to adapt
40: * @return the (possibly adapted) elements to add to/remove from the working
41: * set
42: */
43: IAdaptable[] adaptElements(IWorkingSet ws, IAdaptable[] elements);
44:
45: /**
46: * Disposes of this element adaptor.
47: */
48: void dispose();
49: }
|