blob: 86c154a3b32397bc91b7b50099027a7239871112 (
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
|
/*******************************************************************************
* Copyright (c) 2003, 2005 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.sourcelookup;
import org.eclipse.debug.core.sourcelookup.ISourceContainer;
import org.eclipse.debug.core.sourcelookup.ISourceLookupDirector;
import org.eclipse.swt.widgets.Shell;
/**
* Creates and edits source containers for a source lookup director.
* Contributed via a source container presentation extension for
* a specific type of source container.
* <p>
* Following is an example source container presentation definition
* that contributes a source container browser via the
* <code>browserClass</code> attribute.
* <pre>
* <extension point="org.eclipse.debug.ui.sourceContainerPresentations">
* <sourceContainerPresentation
* browserClass="org.eclipse.debug.internal.ui.sourcelookup.browsers.ProjectSourceContainerBrowser"
* containerTypeID="org.eclipse.debug.core.containerType.project"
* icon="icons/full/obj16/prj_obj.png"
* id="org.eclipse.debug.ui.containerPresentation.project">
* </sourceContainerPresentation>
* </extension>
* </pre>
* </p>
* @since 3.0
*/
public interface ISourceContainerBrowser {
/**
* Creates and returns new source containers to add to the given
* source lookup director.
*
* @param shell the shell to use to parent any dialogs
* @param director the director the new containers will be added to
* @return the new source containers to add
*/
ISourceContainer[] addSourceContainers(Shell shell, ISourceLookupDirector director);
/**
* Returns whether this browser can add any source containers to the
* given source lookup director.
*
* @param director source lookup director to potentially add source
* containers to
* @return whether this browser can add any source containers to the
* given source lookup director
*/
boolean canAddSourceContainers(ISourceLookupDirector director);
/**
* Edits and returns source containers to replace the given source
* containers.
*
* @param shell the shell to use to parent any dialogs
* @param director the director the new containers will be added to
* @param containers the source containers to be edited
* @return the replacement source containers
*/
ISourceContainer[] editSourceContainers(Shell shell, ISourceLookupDirector director, ISourceContainer[] containers);
/**
* Returns whether this browser can edit the given source containers.
*
* @param director source lookup director to potentially edit source
* containers for
* @param containers the containers to edit
* @return whether this browser can edit the given source containers
*/
boolean canEditSourceContainers(ISourceLookupDirector director, ISourceContainer[] containers);
}
|