Skip to content

Package: IMasterDetailSelectionProvider

IMasterDetailSelectionProvider

Coverage

1: /*******************************************************************************
2: * Copyright (c) 2019 Christian W. Damus and others.
3: *
4: * All rights reserved. This program and the accompanying materials
5: * are made available under the terms of the Eclipse Public License 2.0
6: * which accompanies this distribution, and is available at
7: * https://www.eclipse.org/legal/epl-2.0/
8: *
9: * SPDX-License-Identifier: EPL-2.0
10: *
11: * Contributors:
12: * Christian W. Damus - initial API and implementation
13: ******************************************************************************/
14: package org.eclipse.emf.ecp.view.spi.swt.selection;
15:
16: import org.eclipse.jface.viewers.ISelectionProvider;
17:
18: /**
19: * A selection provider for master-detail views in which both the master
20: * and the detail parts may provide a selection. The provider's selection
21: * is the selection of either the master or the detail part, whichever is
22: * currently active (usually meaning that it last had the input focus).
23: * The detail provider can change as the master-detail UI creates/activates/destroys
24: * different detail views, and there needs not always be a detail. Moreover,
25: * the detail is free to provide different kind of selection (e.g., text vs. structured)
26: * to the master.
27: *
28: * @since 1.21
29: */
30: public interface IMasterDetailSelectionProvider extends ISelectionProvider {
31:
32:         /**
33:          * Set the active detail selection provider, or {@code null} if either
34:          * there is no detail or it is not active (in which case the master
35:          * selection provider is deemed active).
36:          *
37:          * @param selectionProvider the detail selection provider to activate,
38:          * or {@code null} to active the implicit master selection provider
39:          */
40:         void setDetailSelectionProvider(ISelectionProvider selectionProvider);
41: }