KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > ui > sourcelookup > ISourceContainerBrowser


1 /*******************************************************************************
2  * Copyright (c) 2003, 2005 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.sourcelookup;
12
13 import org.eclipse.debug.core.sourcelookup.ISourceContainer;
14 import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector;
15 import org.eclipse.swt.widgets.Shell;
16
17
18 /**
19  * Creates and edits source containers for a source lookup director.
20  * Contributed via a source container presentation extension for
21  * a specific type of source container.
22  * <p>
23  * Following is an example source container presentation definition
24  * that contributes a source container browser via the
25  * <code>browserClass</code> attribute.
26  * <pre>
27  * &lt;extension point=&quot;org.eclipse.debug.ui.sourceContainerPresentations&quot;&gt;
28  * &lt;sourceContainerPresentation
29  * browserClass=&quot;org.eclipse.debug.internal.ui.sourcelookup.browsers.ProjectSourceContainerBrowser&quot;
30  * containerTypeID=&quot;org.eclipse.debug.core.containerType.project&quot;
31  * icon=&quot;icons/full/obj16/prj_obj.gif&quot;
32  * id=&quot;org.eclipse.debug.ui.containerPresentation.project&quot;&gt;
33  * &lt;/sourceContainerPresentation&gt;
34  * &lt;/extension&gt;
35  * </pre>
36  * </p>
37  * @since 3.0
38  */

39 public interface ISourceContainerBrowser {
40     /**
41      * Creates and returns new source containers to add to the given
42      * source lookup director.
43      *
44      * @param shell the shell to use to parent any dialogs
45      * @param director the director the new containers will be added to
46      * @return the new source containers to add
47      */

48     public ISourceContainer[] addSourceContainers(Shell shell, ISourceLookupDirector director);
49     
50     /**
51      * Returns whether this browser can add any source containers to the
52      * given source lookup director.
53      *
54      * @param director source lookup director to potentially add source
55      * containers to
56      * @return whether this browser can add any source containers to the
57      * given source lookup director
58      */

59     public boolean canAddSourceContainers(ISourceLookupDirector director);
60     
61     /**
62      * Edits and returns source containers to replace the given source
63      * containers.
64      *
65      * @param shell the shell to use to parent any dialogs
66      * @param director the director the new containers will be added to
67      * @param containers the source containers to be edited
68      * @return the replacement source containers
69      */

70     public ISourceContainer[] editSourceContainers(Shell shell, ISourceLookupDirector director, ISourceContainer[] containers);
71     
72     /**
73      * Returns whether this browser can edit the given source containers.
74      *
75      * @param director source lookup director to potentially edit source
76      * containers for
77      * @param containers the containers to edit
78      * @return whether this browser can edit the given source containers
79      */

80     public boolean canEditSourceContainers(ISourceLookupDirector director, ISourceContainer[] containers);
81     
82 }
83
Popular Tags