Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 0d2ebf2042fc9a8cc8411ad42d4bb43df19adf58 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/*******************************************************************************
 * Copyright (c) 2006, 2013 IBM Corporation and others.
 *
 * This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License 2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.debug.ui;

import java.util.Set;

import org.eclipse.jface.viewers.IStructuredSelection;

/**
 * A detail pane factory creates one or more types of detail panes.
 * <p>
 * Detail pane factories are contributed via the
 * <code>org.eclipse.debug.ui.detailPaneFactories</code> extension point.
 * Following is an example of a detail pane factory extension:
 * </p>
 * 
 * <pre>
 * &lt;extension point="org.eclipse.debug.ui.detailPaneFactories"&gt;
 *     &lt;detailFactories
 *           class="org.eclipse.temp.TableDetailPaneFactory"
 *           name="Table Detail Factory"&gt;
 *     &lt;/detailFactories&gt;
 * &lt;/extension&gt;
 * </pre>
 * 
 * Clients contributing a detail pane factory are intended to implement this
 * interface.
 * 
 * @see IDetailPane
 * @since 3.3
 *
 */
public interface IDetailPaneFactory {

	/**
	 * Returns all possible types detail panes that this factory can
	 * create for the given selection, possibly empty. Detail panes are returned
	 * as a set of detail pane identifiers.
	 *
	 * @param selection The current selection
	 * @return Set of String IDs for possible detail pane types, possibly empty
	 */
	Set<String> getDetailPaneTypes(IStructuredSelection selection);

	/**
	 * Returns the identifier of the default detail pane type to use for the given
	 * selection, or <code>null</code> if this factory has no preference.
	 * A factory can override the platform's default detail pane by returning
	 * a non-<code>null</code> value.
	 *
	 * @param selection The current selection
	 * @return a detail pane type identifier or <code>null</code>
	 */
	String getDefaultDetailPane(IStructuredSelection selection);

	/**
	 * Creates and returns a detail pane corresponding to the given detail pane
	 * type identifier that this factory can produce (according to
	 * <code>getDetailPaneTypes(IStructuredSelection selection)</code>).
	 *
	 * @param paneID The id of the detain pane type to be created
	 * @return detail pane or <code>null</code> if one could not be created
	 */
	IDetailPane createDetailPane(String paneID);

	/**
	 * Returns a name for the detail pane type associated with the given ID
	 * or <code>null</code> if none. Used to
	 * populate the context menu with meaningful names of the pane types.
	 *
	 * @param paneID detail pane type identifier
	 * @return detail pane name or <code>null</code> if none
	 */
	String getDetailPaneName(String paneID);

	/**
	 * Returns a description for the detail pane type associated with the given ID
	 * or <code>null</code> if none.
	 *
	 * @param paneID detail pane type identifier
	 * @return detail pane description or <code>null</code> if none
	 */
	String getDetailPaneDescription(String paneID);

}

Back to the top