KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > ISelectionConversionService


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.internal;
13
14 import org.eclipse.jface.viewers.IStructuredSelection;
15
16 /**
17  * <p>
18  * A service that is capable of converting a selection into resources.
19  * </p>
20  * <p>
21  * This interface is only intended for use within the
22  * <code>org.eclipse.ui.workbench</code> and <code>org.eclipse.ui.ide</code>
23  * plug-ins.
24  * </p>
25  *
26  * @since 3.2
27  */

28 public interface ISelectionConversionService {
29
30     /**
31      * Attempt to convert the elements in the passed selection into resources by
32      * asking each for its IResource property (iff it isn't already a resource).
33      * If all elements in the initial selection can be converted to resources
34      * then answer a new selection containing these resources; otherwise answer
35      * an empty selection.
36      *
37      * @param originalSelection
38      * the original selection; must not be <code>null</code>.
39      * @return the converted selection or an empty selection; never
40      * <code>null</code>.
41      */

42     public IStructuredSelection convertToResources(
43             IStructuredSelection originalSelection);
44
45 }
46
Popular Tags