Project

General

Profile

Download (1.92 KB) Statistics
| Branch: | Tag: | Revision:
1
/*******************************************************************************
2
 * Copyright (c) 2006, 2009 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
package org.eclipse.ui.navigator;
12

    
13
import org.eclipse.core.runtime.IAdaptable;
14
import org.eclipse.jface.viewers.ISelectionProvider;
15
import org.eclipse.swt.widgets.Shell;
16

    
17
/**
18
 * 
19
 * Provides context for extensions including a valid shell, a selection
20
 * provider, and a unique identifier corresponding to the abstract viewer behind
21
 * the viewer site.
22
 *  
23
 * @since 3.2
24
 * @noextend This interface is not intended to be extended by clients.
25
 * @noimplement This interface is not intended to be implemented by clients.
26
 */
27
public interface ICommonViewerSite extends IAdaptable {
28

    
29
	/**
30
	 * 
31
	 * @return The unique identifier associated with the defined abstract
32
	 *         viewer. In general, this will be the id of the
33
	 *         <b>org.eclipse.ui.views</b> extension that defines the view
34
	 *         part.
35
	 */
36
	String getId();
37

    
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
}
(19-19/49)