Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: a986fc6fb4c3313776714b765a93185a6d697f16 (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
/*******************************************************************************
 * Copyright (c) 2008, 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.core.model;

import java.util.Map;

import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.IBreakpointManager;

/**
 * This interface defines a breakpoint import participant.
 * <p>
 * Participants are used during a breakpoint import operation to specify how
 * breakpoints of the associated marker type should be compared and how the
 * breakpoint should be validated once it is decided it will be imported.
 * </p>
 * <p>
 * A breakpoint import participant it contributed via the
 * <code>org.eclipse.debug.core.breakpointImportParticipants</code> extension
 * point.
 * </p>
 * <p>
 * Following is an example of a breakpoint participant extension:
 * </p>
 * 
 * <pre>
 * &lt;extension point="org.eclipse.debug.core.breakpointImportParticipants"&gt;
 *  &lt;importParticipant
 *      participant="x.y.z.BreakpointImportParticipant"
 *      type="org.eclipse.jdt.debug.javaLineBreakpointMarker"&gt;
 *  &lt;/importParticipant&gt;
 * &lt;/extension&gt;
 * </pre>
 * <p>
 * Clients may implement this interface.
 * </p>
 *
 * @see IBreakpointManager
 * @since 3.5
 */
public interface IBreakpointImportParticipant {

	/**
	 * Determines if the given attributes match the given breakpoint.
	 *
	 * @param attributes the map of raw breakpoint attributes read from the import memento
	 * @param breakpoint the current breakpoint context in the import operation
	 * @return true if the breakpoint matches the given attributes, false otherwise
	 * @throws CoreException if an exception occurs
	 */
	boolean matches(Map<String, Object> attributes, IBreakpoint breakpoint) throws CoreException;

	/**
	 * Verifies the state of the breakpoint once it has been imported. This method can be used to correct
	 * attributes of the imported breakpoint once it has been imported.
	 *
	 * For example: updating line number information or character ranges to ensure the marker appears correctly
	 *
	 * @param breakpoint the breakpoint to be verified
	 * @throws CoreException if an exception occurs
	 */
	void verify(IBreakpoint breakpoint) throws CoreException;

}

Back to the top