private static int hasSpawnpointChanges(IMarkerDelta delta, IScriptBreakpoint breakpoint) { final String[] attrs = breakpoint.getUpdatableAttributes(); try { final IMarker marker = delta.getMarker(); for (int i = 0; i < attrs.length; ++i) { final String attr = attrs[i]; if (IBreakpoint.ENABLED.equals(attr) || IMarker.LINE_NUMBER.equals(attr)) { final Object oldValue = delta.getAttribute(attr); final Object newValue = marker.getAttribute(attr); if (oldValue == null) { if (newValue != null) { return IMarker.LINE_NUMBER.equals(attr) ? MAJOR_CHANGE : MINOR_CHANGE; } continue; } if (newValue == null) { return IMarker.LINE_NUMBER.equals(attr) ? MAJOR_CHANGE : MINOR_CHANGE; } if (!oldValue.equals(newValue)) { return IMarker.LINE_NUMBER.equals(attr) ? MAJOR_CHANGE : MINOR_CHANGE; } } } } catch (CoreException e) { DLTKDebugPlugin.log(e); } return NO_CHANGES; }
private int hasBreakpointChanges(IMarkerDelta delta, IScriptBreakpoint breakpoint) { final String[] attrs = breakpoint.getUpdatableAttributes(); try { final IMarker marker = delta.getMarker(); for (int i = 0; i < attrs.length; ++i) { final String attr = attrs[i]; final Object oldValue = delta.getAttribute(attr); final Object newValue = marker.getAttribute(attr); if (oldValue == null) { if (newValue != null) { return classifyBreakpointChange(delta, breakpoint, attr); } continue; } if (newValue == null) { return classifyBreakpointChange(delta, breakpoint, attr); } if (!oldValue.equals(newValue)) { return classifyBreakpointChange(delta, breakpoint, attr); } } } catch (CoreException e) { DLTKDebugPlugin.log(e); } return NO_CHANGES; }