author | Eugene Ostroukhov <eugeneo@symbian.org> |
Mon, 07 Jun 2010 16:51:19 -0700 | |
changeset 355 | 8726e95bcbba |
parent 52 | f577ea64429e |
permissions | -rw-r--r-- |
2 | 1 |
// Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 |
// Use of this source code is governed by a BSD-style license that can be |
|
3 |
// found in the LICENSE file. |
|
4 |
||
5 |
package org.chromium.debug.core.model; |
|
6 |
||
355
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
7 |
import java.util.ArrayList; |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
8 |
import java.util.List; |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
9 |
|
2 | 10 |
import org.chromium.debug.core.ChromiumDebugPlugin; |
11 |
import org.chromium.sdk.Breakpoint; |
|
355
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
12 |
import org.chromium.sdk.JavascriptVm; |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
13 |
import org.chromium.sdk.SyncCallback; |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
14 |
import org.chromium.sdk.JavascriptVm.BreakpointCallback; |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
15 |
import org.eclipse.core.resources.IFile; |
2 | 16 |
import org.eclipse.core.resources.IMarker; |
17 |
import org.eclipse.core.resources.IResource; |
|
18 |
import org.eclipse.core.resources.IWorkspaceRunnable; |
|
19 |
import org.eclipse.core.runtime.CoreException; |
|
20 |
import org.eclipse.core.runtime.IProgressMonitor; |
|
355
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
21 |
import org.eclipse.debug.core.IBreakpointManager; |
2 | 22 |
import org.eclipse.debug.core.model.IBreakpoint; |
23 |
import org.eclipse.debug.core.model.LineBreakpoint; |
|
24 |
import org.eclipse.osgi.util.NLS; |
|
25 |
||
26 |
/** |
|
27 |
* JavaScript line breakpoint. |
|
28 |
*/ |
|
29 |
public class ChromiumLineBreakpoint extends LineBreakpoint { |
|
30 |
||
31 |
/** Ignore count */ |
|
32 |
private static final String IGNORE_COUNT_ATTR = ChromiumDebugPlugin.PLUGIN_ID + ".ignoreCount"; //$NON-NLS-1$ |
|
33 |
||
34 |
/** Condition */ |
|
35 |
private static final String CONDITION_ATTR = ChromiumDebugPlugin.PLUGIN_ID + ".condition"; //$NON-NLS-1$ |
|
36 |
||
37 |
/** |
|
38 |
* Default constructor is required for the breakpoint manager to re-create |
|
39 |
* persisted breakpoints. After instantiating a breakpoint, the setMarker |
|
40 |
* method is called to restore this breakpoint's attributes. |
|
41 |
*/ |
|
42 |
public ChromiumLineBreakpoint() { |
|
43 |
} |
|
44 |
||
45 |
/** |
|
46 |
* Constructs a line breakpoint on the given resource at the given line number |
|
47 |
* (line number is 1-based). |
|
48 |
* |
|
49 |
* @param resource file on which to set the breakpoint |
|
50 |
* @param lineNumber 1-based line number of the breakpoint |
|
51 |
* @throws CoreException if unable to create the breakpoint |
|
52 |
*/ |
|
355
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
53 |
public ChromiumLineBreakpoint(final IResource resource, final int lineNumber, |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
54 |
final String modelId) throws CoreException { |
2 | 55 |
IWorkspaceRunnable runnable = new IWorkspaceRunnable() { |
56 |
public void run(IProgressMonitor monitor) throws CoreException { |
|
57 |
IMarker marker = resource.createMarker(ChromiumDebugPlugin.BP_MARKER); |
|
58 |
setMarker(marker); |
|
59 |
marker.setAttribute(IBreakpoint.ENABLED, Boolean.TRUE); |
|
60 |
marker.setAttribute(IMarker.LINE_NUMBER, lineNumber); |
|
355
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
61 |
marker.setAttribute(IBreakpoint.ID, modelId); |
2 | 62 |
marker.setAttribute(IMarker.MESSAGE, NLS.bind( |
63 |
Messages.JsLineBreakpoint_MessageMarkerFormat, resource.getName(), lineNumber)); |
|
64 |
} |
|
65 |
}; |
|
66 |
run(getMarkerRule(resource), runnable); |
|
67 |
} |
|
68 |
||
69 |
@Override |
|
70 |
public boolean isEnabled() { |
|
71 |
try { |
|
72 |
return super.isEnabled(); |
|
73 |
} catch (CoreException e) { |
|
74 |
ChromiumDebugPlugin.log(e); |
|
75 |
return false; |
|
76 |
} |
|
77 |
} |
|
78 |
||
79 |
public void setIgnoreCount(int ignoreCount) { |
|
80 |
setMarkerAttribute(IGNORE_COUNT_ATTR, ignoreCount); |
|
81 |
} |
|
82 |
||
83 |
private void setMarkerAttribute(String attributeName, Object value) { |
|
84 |
try { |
|
85 |
setAttribute(attributeName, value); |
|
86 |
} catch (CoreException e) { |
|
87 |
ChromiumDebugPlugin.log(e); |
|
88 |
} |
|
89 |
} |
|
90 |
||
91 |
public int getIgnoreCount() { |
|
92 |
return getMarker().getAttribute(IGNORE_COUNT_ATTR, Breakpoint.EMPTY_VALUE); |
|
93 |
} |
|
94 |
||
95 |
public void setCondition(String condition) throws CoreException { |
|
96 |
setMarkerAttribute(CONDITION_ATTR, condition); |
|
97 |
} |
|
98 |
||
99 |
public String getCondition() { |
|
100 |
return getMarker().getAttribute(CONDITION_ATTR, null); |
|
101 |
} |
|
102 |
||
103 |
public String getModelIdentifier() { |
|
355
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
104 |
return getMarker().getAttribute(IBreakpoint.ID, ""); |
2 | 105 |
} |
106 |
||
355
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
107 |
/** |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
108 |
* A helper that propagates changes in Eclipse Debugger breakpoints (i.e. |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
109 |
* {@link ChromiumLineBreakpoint}) to ChromeDevTools SDK breakpoints. Note that |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
110 |
* {@link ChromiumLineBreakpoint} can't do it itself, because it may correspond to several |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
111 |
* SDK {@link JavascriptVm}'s simultaneously. |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
112 |
*/ |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
113 |
public static class Helper { |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
114 |
public interface CreateOnRemoveCallback { |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
115 |
void success(Breakpoint breakpoint); |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
116 |
void failure(String errorMessage); |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
117 |
} |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
118 |
|
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
119 |
public static void createOnRemote(ChromiumLineBreakpoint uiBreakpoint, |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
120 |
VmResourceId scriptId, DebugTargetImpl debugTarget, |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
121 |
final CreateOnRemoveCallback createOnRemoveCallback, |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
122 |
SyncCallback syncCallback) throws CoreException { |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
123 |
JavascriptVm javascriptVm = debugTarget.getJavascriptEmbedder().getJavascriptVm(); |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
124 |
|
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
125 |
// ILineBreakpoint lines are 1-based while V8 lines are 0-based |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
126 |
final int line = (uiBreakpoint.getLineNumber() - 1); |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
127 |
BreakpointCallback callback = new BreakpointCallback() { |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
128 |
public void success(Breakpoint sdkBreakpoint) { |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
129 |
createOnRemoveCallback.success(sdkBreakpoint); |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
130 |
} |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
131 |
public void failure(String errorMessage) { |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
132 |
createOnRemoveCallback.failure(errorMessage); |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
133 |
} |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
134 |
}; |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
135 |
|
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
136 |
javascriptVm.setBreakpoint(scriptId.getTypeForBreakpoint(), |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
137 |
scriptId.getTargetForBreakpoint(), |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
138 |
line, |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
139 |
Breakpoint.EMPTY_VALUE, |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
140 |
uiBreakpoint.isEnabled(), |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
141 |
uiBreakpoint.getCondition(), |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
142 |
uiBreakpoint.getIgnoreCount(), |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
143 |
callback, syncCallback); |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
144 |
} |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
145 |
|
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
146 |
public static void updateOnRemote(Breakpoint sdkBreakpoint, |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
147 |
ChromiumLineBreakpoint uiBreakpoint) { |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
148 |
sdkBreakpoint.setCondition(uiBreakpoint.getCondition()); |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
149 |
sdkBreakpoint.setEnabled(uiBreakpoint.isEnabled()); |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
150 |
sdkBreakpoint.setIgnoreCount(uiBreakpoint.getIgnoreCount()); |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
151 |
sdkBreakpoint.flush(null, null); |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
152 |
} |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
153 |
|
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
154 |
public static ChromiumLineBreakpoint createLocal(Breakpoint sdkBreakpoint, |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
155 |
IBreakpointManager breakpointManager, IFile resource, int script_line_offset, |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
156 |
String debugModelId) throws CoreException { |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
157 |
ChromiumLineBreakpoint uiBreakpoint = new ChromiumLineBreakpoint(resource, |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
158 |
(int) sdkBreakpoint.getLineNumber() + 1 + script_line_offset, |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
159 |
debugModelId); |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
160 |
uiBreakpoint.setCondition(sdkBreakpoint.getCondition()); |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
161 |
uiBreakpoint.setEnabled(sdkBreakpoint.isEnabled()); |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
162 |
uiBreakpoint.setIgnoreCount(sdkBreakpoint.getIgnoreCount()); |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
163 |
ignoreList.add(uiBreakpoint); |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
164 |
try { |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
165 |
breakpointManager.addBreakpoint(uiBreakpoint); |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
166 |
} finally { |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
167 |
ignoreList.remove(uiBreakpoint); |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
168 |
} |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
169 |
return uiBreakpoint; |
2 | 170 |
} |
171 |
} |
|
172 |
||
355
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
173 |
private static final BreakpointIgnoreList ignoreList = new BreakpointIgnoreList(); |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
174 |
|
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
175 |
public static BreakpointIgnoreList getIgnoreList() { |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
176 |
return ignoreList; |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
177 |
} |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
178 |
|
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
179 |
public static class BreakpointIgnoreList { |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
180 |
private final List<ChromiumLineBreakpoint> list = new ArrayList<ChromiumLineBreakpoint>(1); |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
181 |
|
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
182 |
public boolean contains(IBreakpoint breakpoint) { |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
183 |
return list.contains(breakpoint); |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
184 |
} |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
185 |
|
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
186 |
public void remove(ChromiumLineBreakpoint lineBreakpoint) { |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
187 |
boolean res = list.remove(lineBreakpoint); |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
188 |
if (!res) { |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
189 |
throw new IllegalStateException(); |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
190 |
} |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
191 |
} |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
192 |
|
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
193 |
public void add(ChromiumLineBreakpoint lineBreakpoint) { |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
194 |
if (list.contains(lineBreakpoint)) { |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
195 |
throw new IllegalStateException(); |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
196 |
} |
8726e95bcbba
Initial commit of updated Chrome Java SDK
Eugene Ostroukhov <eugeneo@symbian.org>
parents:
52
diff
changeset
|
197 |
list.add(lineBreakpoint); |
2 | 198 |
} |
199 |
} |
|
200 |
} |