[#1472] Add a Settings.executeDebugging property, and move server-side
Console logic to core - Fixed wrong breakpoint ID comparisons
This commit is contained in:
parent
92b8bbd3e4
commit
7d3b83a97d
@ -381,14 +381,18 @@ public class DebuggerPane extends JPanel {
|
||||
|
||||
void modifyBreakpoint(Breakpoint breakpoint) {
|
||||
int childCount = rootNode.getChildCount();
|
||||
|
||||
for (int i = 0; i < childCount; i++) {
|
||||
CheckBoxNode checkBoxNode = (CheckBoxNode) rootNode.getChildAt(i);
|
||||
Breakpoint b = (Breakpoint) checkBoxNode.getUserObject();
|
||||
if (b.getID() == breakpoint.getID()) {
|
||||
|
||||
if (b.equals(breakpoint)) {
|
||||
checkBoxNode.setUserObject(breakpoint);
|
||||
|
||||
if (checkBoxNode.isSelected()) {
|
||||
debugger.addBreakpoint(breakpoint);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -111,7 +111,7 @@ class ClientDebugger implements Debugger {
|
||||
}
|
||||
|
||||
for (int i = 0; i < breakpoints.length; i++) {
|
||||
if (breakpoints[i].getID() == breakpoint.getID()) {
|
||||
if (breakpoints[i].equals(breakpoint)) {
|
||||
breakpoints[i] = breakpoint;
|
||||
comm.asyncSend(new CMS_addBreakpoint(breakpoint));
|
||||
return;
|
||||
@ -130,14 +130,15 @@ class ClientDebugger implements Debugger {
|
||||
@Override
|
||||
public void removeBreakpoint(Breakpoint breakpoint) {
|
||||
synchronized (BREAKPOINT_LOCK) {
|
||||
if(this.breakpoints == null) {
|
||||
if (this.breakpoints == null) {
|
||||
return;
|
||||
}
|
||||
for(int i=0; i<breakpoints.length; i++) {
|
||||
if(breakpoints[i].getID() == breakpoint.getID()) {
|
||||
if(breakpoints.length == 1) {
|
||||
for (int i = 0; i < breakpoints.length; i++) {
|
||||
if (breakpoints[i].equals(breakpoint)) {
|
||||
if (breakpoints.length == 1) {
|
||||
breakpoints = null;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
Breakpoint[] newBreakpoints = new Breakpoint[breakpoints.length - 1];
|
||||
System.arraycopy(breakpoints, 0, newBreakpoints, 0, i);
|
||||
System.arraycopy(breakpoints, i + 1, newBreakpoints, i, newBreakpoints.length - i);
|
||||
|
||||
@ -106,7 +106,7 @@ class LocalDebugger implements Debugger {
|
||||
}
|
||||
|
||||
for (int i = 0; i < breakpoints.length; i++) {
|
||||
if (breakpoints[i].getID() == breakpoint.getID()) {
|
||||
if (breakpoints[i].equals(breakpoint)) {
|
||||
breakpoints[i] = breakpoint;
|
||||
return;
|
||||
}
|
||||
@ -122,14 +122,15 @@ class LocalDebugger implements Debugger {
|
||||
@Override
|
||||
public void removeBreakpoint(Breakpoint breakpoint) {
|
||||
synchronized (BREAKPOINT_LOCK) {
|
||||
if(this.breakpoints == null) {
|
||||
if (this.breakpoints == null) {
|
||||
return;
|
||||
}
|
||||
for(int i=0; i<breakpoints.length; i++) {
|
||||
if(breakpoints[i].getID() == breakpoint.getID()) {
|
||||
if(breakpoints.length == 1) {
|
||||
for (int i = 0; i < breakpoints.length; i++) {
|
||||
if (breakpoints[i].equals(breakpoint)) {
|
||||
if (breakpoints.length == 1) {
|
||||
breakpoints = null;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
Breakpoint[] newBreakpoints = new Breakpoint[breakpoints.length - 1];
|
||||
System.arraycopy(breakpoints, 0, newBreakpoints, 0, i);
|
||||
System.arraycopy(breakpoints, i + 1, newBreakpoints, i, newBreakpoints.length - i);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user