diff --git a/src/org/ntlab/traceDebugger/CallStackViewRelatedDelta.java b/src/org/ntlab/traceDebugger/CallStackViewRelatedDelta.java index 9aa0b9f..c97c4ff 100644 --- a/src/org/ntlab/traceDebugger/CallStackViewRelatedDelta.java +++ b/src/org/ntlab/traceDebugger/CallStackViewRelatedDelta.java @@ -55,9 +55,7 @@ String calleeClassName = callee.getThisClassName(); String calleeId = callee.getThisObjId(); TracePoint before = callee.getCallerTracePoint(); -// Variable variable = new Variable("tmp", callerClassName, callerId, calleeClassName, calleeId, before, false); DeltaMarkerView newDeltaMarkerView = (DeltaMarkerView)TraceDebuggerPlugin.createNewView(DeltaMarkerView.ID, IWorkbenchPage.VIEW_ACTIVATE); -// newDeltaMarkerView.extractDelta(variable, false); newDeltaMarkerView.extractDeltaForThisToAnother(callerId, callerClassName, calleeId, calleeClassName, before); } } diff --git a/src/org/ntlab/traceDebugger/VariableViewRelatedDelta.java b/src/org/ntlab/traceDebugger/VariableViewRelatedDelta.java index f9b9546..7067db3 100644 --- a/src/org/ntlab/traceDebugger/VariableViewRelatedDelta.java +++ b/src/org/ntlab/traceDebugger/VariableViewRelatedDelta.java @@ -92,7 +92,6 @@ @Override public void run() { DeltaMarkerView newDeltaMarkerView = (DeltaMarkerView)TraceDebuggerPlugin.createNewView(DeltaMarkerView.ID, IWorkbenchPage.VIEW_ACTIVATE); -// newDeltaMarkerView.extractDelta(selectedVariable, true); newDeltaMarkerView.extractDeltaForContainerToComponent(selectedVariable); } }; @@ -114,8 +113,7 @@ anotherId = selectedVariable.getValueId(); anotherClassName = selectedVariable.getValueClassName(); } - DeltaMarkerView newDeltaMarkerView = (DeltaMarkerView)TraceDebuggerPlugin.createNewView(DeltaMarkerView.ID, IWorkbenchPage.VIEW_ACTIVATE); -// newDeltaMarkerView.extractDelta(selectedVariable, false); + DeltaMarkerView newDeltaMarkerView = (DeltaMarkerView)TraceDebuggerPlugin.createNewView(DeltaMarkerView.ID, IWorkbenchPage.VIEW_ACTIVATE); newDeltaMarkerView.extractDeltaForThisToAnother(thisId, thisClassName, anotherId, anotherClassName, before); } }; @@ -175,7 +173,6 @@ String containerClassName = selectedVariable.getContainerClassName(); if (containerId != null && containerClassName != null) { containerClassName = containerClassName.substring(containerClassName.lastIndexOf(".") + 1); -// String textForContainerToComponent = String.format("Extract Delta (%s: %s �� %s: %s)", containerId, containerClassName, valueId, valueClassName); String textForContainerToComponent = String.format("Extract Delta [ %s (id = %s) -> %s (id = %s) ]", containerClassName, containerId, valueClassName, valueId); deltaActionForContainerToComponent.setText(textForContainerToComponent); deltaActionForContainerToComponent.setToolTipText(textForContainerToComponent); @@ -204,7 +201,6 @@ String thisClassName = before.getMethodExecution().getThisClassName(); if (thisId != null && thisClassName != null) { thisClassName = thisClassName.substring(thisClassName.lastIndexOf(".") + 1); -// String textForThisToAnother = String.format("Extract Delta (%s: %s �� %s: %s)", thisId, thisClassName, anotherId, anotherClassName); String textForThisToAnother = String.format("Extract Delta [ %s (id = %s) -> %s (id = %s) ]", thisClassName, thisId, anotherClassName, anotherId); deltaActionForThisToAnother.setText(textForThisToAnother); deltaActionForThisToAnother.setToolTipText(textForThisToAnother); @@ -215,26 +211,6 @@ return false; } } - -// private boolean updateDeltaActionForThisToAnotherTexts(Variable variable) { -// String valueId = selectedVariable.getValueId(); -// String valueClassName = selectedVariable.getValueClassName(); -// valueClassName = valueClassName.substring(valueClassName.lastIndexOf(".") + 1); -// TracePoint before = selectedVariable.getBeforeTracePoint(); -// String thisId = before.getMethodExecution().getThisObjId(); -// String thisClassName = before.getMethodExecution().getThisClassName(); -// if (thisId != null && thisClassName != null) { -// thisClassName = thisClassName.substring(thisClassName.lastIndexOf(".") + 1); -// String textForThisToAnother = String.format("Extract Delta (%s: %s �� %s: %s)", thisId, thisClassName, valueId, valueClassName); -// deltaActionForThisToAnother.setText(textForThisToAnother); -// deltaActionForThisToAnother.setToolTipText(textForThisToAnother); -// return true; -// } else { -// deltaActionForThisToAnother.setText(""); -// deltaActionForThisToAnother.setToolTipText(""); -// return false; -// } -// } public void markAndExpandVariablesByDeltaMarkers(Map> markers) { List srcSideDeltaMarkers = markers.get(DeltaMarkerManager.SRC_SIDE_DELTA_MARKER); diff --git a/src/org/ntlab/traceDebugger/analyzerProvider/DeltaExtractionAnalyzer.java b/src/org/ntlab/traceDebugger/analyzerProvider/DeltaExtractionAnalyzer.java index 5c15180..1be49c6 100644 --- a/src/org/ntlab/traceDebugger/analyzerProvider/DeltaExtractionAnalyzer.java +++ b/src/org/ntlab/traceDebugger/analyzerProvider/DeltaExtractionAnalyzer.java @@ -60,11 +60,6 @@ } public DeltaMarkerManager extractDeltaForThisToAnother(String thisId, String thisClassName, String anotherId, String anotherClassName, TracePoint before) { -// TracePoint before = variable.getBeforeTracePoint(); -// String srcId = before.getMethodExecution().getThisObjId(); -// String srcClassName = before.getMethodExecution().getThisClassName(); -// String dstId = variable.getValueId(); -// String dstClassName = variable.getValueClassName(); MethodExecution me = before.getMethodExecution(); Map references = me.getObjectReferences(anotherClassName); ObjectReference objectReference = null; @@ -86,34 +81,6 @@ Reference reference = new Reference(thisId, anotherId, thisClassName, anotherClassName); return new DeltaMarkerManager(coordinator, bottomPoint, reference, aliasCollector); } - -// public DeltaMarkerManager extractDeltaForThisToAnother(Variable variable) { -// TracePoint before = variable.getBeforeTracePoint(); -// String srcId = before.getMethodExecution().getThisObjId(); -// String srcClassName = before.getMethodExecution().getThisClassName(); -// String dstId = variable.getValueId(); -// String dstClassName = variable.getValueClassName(); -// MethodExecution me = before.getMethodExecution(); -// Map references = me.getObjectReferences(dstClassName); -// ObjectReference objectReference = null; -// TracePoint tp = null; -// for (Map.Entry entry : references.entrySet()) { -// ObjectReference key = entry.getKey(); -// if (key.getId().equals(dstId)) { -// objectReference = key; -// tp = entry.getValue(); -// break; -// } -// } -// -// // �f���^���o -// TracePoint bottomPoint = tp.duplicate(); -// DeltaRelatedAliasCollector aliasCollector = new DeltaRelatedAliasCollector(srcId, dstId); -// extractedStructure = deltaExtractor.extract(tp, objectReference, aliasCollector); -// MethodExecution coordinator = extractedStructure.getCoordinator(); -// Reference reference = new Reference(srcId, dstId, srcClassName, dstClassName); -// return new DeltaMarkerManager(coordinator, bottomPoint, reference, aliasCollector); -// } private TracePoint findTracePoint(Reference reference, MethodExecution methodExecution, long beforeTime) { List statements = methodExecution.getStatements();