KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > ui > IDetailPaneFactory


1 /*******************************************************************************
2  * Copyright (c) 2006, 2007 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.debug.ui;
12
13 import java.util.Set JavaDoc;
14
15 import org.eclipse.jface.viewers.IStructuredSelection;
16
17 /**
18  * A detail pane factory creates one or more types of detail panes.
19  * <p>
20  * Detail pane factories are contributed via the <code>org.eclipse.debug.ui.detailPaneFactories</code>
21  * extension point. Following is an example of a detail pane factory extension:
22  * <pre>
23  * &lt;extension point="org.eclipse.debug.ui.detailPaneFactories"&gt;
24  * &lt;detailFactories
25  * class="org.eclipse.temp.TableDetailPaneFactory"
26  * name="Table Detail Factory"&gt;
27  * &lt;/detailFactories&gt;
28  * &lt;/extension&gt;
29  * </pre>
30  * </p>
31  * <p>
32  * <p>
33  * Clients contributing a detail pane factory are intended to implement this interface.
34  * @see IDetailPane
35  * @since 3.3
36  *
37  */

38 public interface IDetailPaneFactory {
39
40     /**
41      * Returns all possible types detail panes that this factory can
42      * create for the given selection, possibly empty. Detail panes are returned
43      * as a set of detail pane identifiers.
44      *
45      * @param selection The current selection
46      * @return Set of String IDs for possible detail pane types, possibly empty
47      */

48     public Set JavaDoc getDetailPaneTypes(IStructuredSelection selection);
49     
50     /**
51      * Returns the identifier of the default detail pane type to use for the given
52      * selection, or <code>null</code> if this factory has no preference.
53      * A factory can override the platform's default detail pane by returning
54      * a non-<code>null</code> value.
55      *
56      * @param selection The current selection
57      * @return a detail pane type identifier or <code>null</code>
58      */

59     public String JavaDoc getDefaultDetailPane(IStructuredSelection selection);
60     
61     /**
62      * Creates and returns a detail pane corresponding to the given detail pane
63      * type identifier that this factory can produce (according to
64      * <code>getDetailPaneTypes(IStructuredSelection selection)</code>).
65      *
66      * @param paneID The id of the detain pane type to be created
67      * @return detail pane or <code>null</code> if one could not be created
68      */

69     public IDetailPane createDetailPane(String JavaDoc paneID);
70     
71     /**
72      * Returns a name for the detail pane type associated with the given ID
73      * or <code>null</code> if none. Used to
74      * populate the context menu with meaningful names of the pane types.
75      *
76      * @param paneID detail pane type identifier
77      * @return detail pane name or <code>null</code> if none
78      */

79     public String JavaDoc getDetailPaneName(String JavaDoc paneID);
80     
81     /**
82      * Returns a description for the detail pane type associated with the given ID
83      * or <code>null</code> if none.
84      *
85      * @param paneID detail pane type identifier
86      * @return detail pane description or <code>null</code> if none
87      */

88     public String JavaDoc getDetailPaneDescription(String JavaDoc paneID);
89     
90 }
91
Popular Tags