Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: ed7fa04d634a91aba7fb630fcba6e6df896cf65b (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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
/*******************************************************************************
 * Copyright (c) 2012 Wind River Systems and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors:
 *     Wind River Systems - initial API and implementation
 *******************************************************************************/
package org.eclipse.cdt.debug.ui.breakpoints;

import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.ui.actions.IToggleBreakpointsTargetExtension;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.ui.IWorkbenchPart;

/**
 * Second extension interface for {@link org.eclipse.debug.ui.actions.IToggleBreakpointsTarget}.
 * This interface provides the ability open edit a breakpoint's properties and 
 * to create a breakpoint in the given context with additional user input 
 * (such as using a dialog or a wizard).
 * <p>
 * Clients implementing <code>IToggleBreakpointsTarget</code> may optionally
 * implement this interface.
 * </p>
 * @since 7.2
 * @see org.eclipse.debug.ui.actions.ToggleBreakpointAction
 */
public interface IToggleBreakpointsTargetCExtension extends IToggleBreakpointsTargetExtension {

    /**
     * Returns whether the toggle target can create a line breakpoint at the 
     * given location.  If the implementation does not support creating the 
     * breakpoint interactively then it should return <code>false</code>.
     * <p>
     * The selection varies depending on the given part. For example,
     * a text selection is provided for text editors, and a structured
     * selection is provided for tree views, and may be a multi-selection.
     * </p>
     * @param part the part on which the action has been invoked  
     * @param selection selection on which line breakpoints should be toggled
     * @return Returns <code>true</code> if toggle target is able interactively
     * create a breakpoint(s) at the given location.
     */
    public boolean canCreateLineBreakpointsInteractive(IWorkbenchPart part, ISelection selection);

	/**
     * Creates new line breakpoints interactively.  The implementation should 
     * allows the user to edit all of the breakpoint's settings prior to 
     * creating the breakpoint.  Unlike the 
     * {@link #toggleLineBreakpoints(IWorkbenchPart, ISelection)}
     * method, this method does not remove the existing breakpoint at given 
     * location.  It always creates a new breakpoint
     * <p>
     * The selection varies depending on the given part. For example,
     * a text selection is provided for text editors, and a structured
     * selection is provided for tree views, and may be a multi-selection.
     * </p>
     * @param part the part on which the action has been invoked  
     * @param selection selection on which line breakpoints should be toggled
     * @throws CoreException if unable to perform the action 
     */
    public void createLineBreakpointsInteractive(IWorkbenchPart part, ISelection selection) throws CoreException;
    
    /**
     * Returns whether the toggle target can create a watchpoint at the 
     * given location.  If the implementation does not support creating the 
     * breakpoint interactively then it should return <code>false</code>.
     * <p>
     * The selection varies depending on the given part. For example,
     * a text selection is provided for text editors, and a structured
     * selection is provided for tree views, and may be a multi-selection.
     * </p>
     * @param part the part on which the action has been invoked  
     * @param selection selection on which line breakpoints should be toggled
     * @return Returns <code>true</code> if toggle target is able interactively
     * create a breakpoint(s) at the given location.
     */
    public boolean canCreateWatchpointsInteractive(IWorkbenchPart part, ISelection selection);

    /**
     * Creates new watchpoint interactively.  The implementation should 
     * allows the user to edit all of the breakpoint's settings prior to 
     * creating the breakpoint.  Unlike the 
     * {@link #toggleLineBreakpoints(IWorkbenchPart, ISelection)}
     * method, this method does not remove the existing breakpoint at given 
     * location.  It always creates a new breakpoint
     * <p>
     * The selection varies depending on the given part. For example,
     * a text selection is provided for text editors, and a structured
     * selection is provided for tree views, and may be a multi-selection.
     * </p>
     * @param part the part on which the action has been invoked  
     * @param selection selection on which line breakpoints should be toggled
     * @throws CoreException if unable to perform the action 
     */
    public void createWatchpointsInteractive(IWorkbenchPart part, ISelection selection) throws CoreException;
    
    /**
     * Returns whether the toggle target can create a function breakpoint at the 
     * given location.  If the implementation does not support creating the 
     * breakpoint interactively then it should return <code>false</code>.
     * <p>
     * The selection varies depending on the given part. For example,
     * a text selection is provided for text editors, and a structured
     * selection is provided for tree views, and may be a multi-selection.
     * </p>
     * @param part the part on which the action has been invoked  
     * @param selection selection on which line breakpoints should be toggled
     * @return Returns <code>true</code> if toggle target is able interactively
     * create a breakpoint(s) at the given location.
     */
    public boolean canCreateFunctionBreakpointInteractive(IWorkbenchPart part, ISelection selection);
    
    /**
     * Creates new function breakpoint interactively.  The implementation should 
     * allows the user to edit all of the breakpoint's settings prior to 
     * creating the breakpoint.  Unlike the 
     * {@link #toggleLineBreakpoints(IWorkbenchPart, ISelection)}
     * method, this method does not remove the existing breakpoint at given 
     * location.  It always creates a new breakpoint
     * <p>
     * The selection varies depending on the given part. For example,
     * a text selection is provided for text editors, and a structured
     * selection is provided for tree views, and may be a multi-selection.
     * </p>
     * @param part the part on which the action has been invoked  
     * @param selection selection on which line breakpoints should be toggled
     * @throws CoreException if unable to perform the action 
     */
    public void createFunctionBreakpointInteractive(IWorkbenchPart part, ISelection selection) throws CoreException;
}

Back to the top