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 classifyBreakpointChange( IMarkerDelta delta, IScriptBreakpoint breakpoint, String attr) throws CoreException { final boolean conditional = ScriptBreakpointUtils.isConditional(breakpoint); if (conditional && AbstractScriptBreakpoint.EXPRESSION.equals(attr)) { return MAJOR_CHANGE; } final boolean oldExprState = delta.getAttribute(AbstractScriptBreakpoint.EXPRESSION_STATE, false); final String oldExpr = delta.getAttribute(AbstractScriptBreakpoint.EXPRESSION, null); if (ScriptBreakpointUtils.isConditional(oldExprState, oldExpr) != conditional) { return MAJOR_CHANGE; } if (IMarker.LINE_NUMBER.equals(attr) && !target.getOptions().get(DebugOption.DBGP_BREAKPOINT_UPDATE_LINE_NUMBER)) { return MAJOR_CHANGE; } return MINOR_CHANGE; }