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.navigator;
11:
12: import org.eclipse.core.runtime.IAdaptable;
13: import org.eclipse.jface.viewers.ISelectionProvider;
14: import org.eclipse.swt.widgets.Shell;
15:
16: /**
17: *
18: * Provides context for extensions including a valid shell, a selection
19: * provider, and a unique identifer corresponding to the abstract viewer behind
20: * the viewer site.
21: *
22: * <p>
23: * This interface is not intended to be implemented by clients.
24: * </p>
25: *
26: * @since 3.2
27: */
28: public interface ICommonViewerSite extends IAdaptable {
29:
30: /**
31: *
32: * @return The unique identifier associated with the defined abstract
33: * viewer. In general, this will be the id of the
34: * <b>org.eclipse.ui.views</b> extension that defines the view
35: * part.
36: */
37: String getId();
38:
39: /**
40: *
41: * @return A valid shell corresponding to the shell of the
42: * {@link CommonViewer}
43: */
44: Shell getShell();
45:
46: /**
47: *
48: * @return The selection provider that can provide a current, valid
49: * selection. The default selection provider is the
50: * {@link CommonViewer}.
51: */
52: ISelectionProvider getSelectionProvider();
53:
54: /**
55: * Sets the selection provider for this common viewer site.
56: *
57: * @param provider
58: * the selection provider, or <code>null</code> to clear it
59: */
60: public void setSelectionProvider(ISelectionProvider provider);
61:
62: }
|