diff --git a/plugin.xml b/plugin.xml index 1310c0e..0923eaf 100644 --- a/plugin.xml +++ b/plugin.xml @@ -12,7 +12,7 @@ class="org.ntlab.traceDebugger.BreakPointView" icon="icons/view/breakpoint_view.png" id="org.ntlab.traceDebugger.breakPointView" - name="Breakpoints" + name="ブレークポイント" restorable="true"> diff --git a/src/org/ntlab/traceDebugger/BreakPointView.java b/src/org/ntlab/traceDebugger/BreakPointView.java index 0ac0ddf..dc8411a 100644 --- a/src/org/ntlab/traceDebugger/BreakPointView.java +++ b/src/org/ntlab/traceDebugger/BreakPointView.java @@ -76,7 +76,8 @@ table.setLinesVisible(true); // �e�[�u���̃J�������쐬 - String[] tableColumnTexts = {"", "Line", "Signature"}; + String[] tableColumnTexts = TraceDebuggerPlugin.isJapanese() ? new String[]{"", "�s", "���\�b�h"} + : new String[]{"", "Line", "Signature"}; int[] tableColumnWidth = {50, 80, 500}; TableColumn[] tableColumns = new TableColumn[tableColumnTexts.length]; for (int i = 0; i < tableColumns.length; i++) { @@ -126,6 +127,11 @@ TraceDebuggerPlugin.setActiveView(ID, this); } + @Override + public String getTitle() { + return TraceDebuggerPlugin.isJapanese() ? "�u���[�N�|�C���g" : "Breakpoints"; + } + public Viewer getViewer() { return viewer; } @@ -140,7 +146,11 @@ protected void createActions() { ImageRegistry registry = TraceDebuggerPlugin.getDefault().getImageRegistry(); ImageDescriptor fileOpenIcon = PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJ_FOLDER); - fileOpenAction = new Action("Open Trace File...", fileOpenIcon) { + boolean isJapanese = TraceDebuggerPlugin.isJapanese(); + String msg; + + msg = (isJapanese) ? "�g���[�X�t�@�C�����J��" : "Open Trace File..."; + fileOpenAction = new Action(msg, fileOpenIcon) { @Override public void run() { // �g���[�X�o�͐�Q�ƃE�B�U�[�h @@ -154,8 +164,9 @@ debuggingController.addTraceBreakPointAction(); } }; - addTraceBreakPointAction.setText("Add a New Trace Breakpoint"); - addTraceBreakPointAction.setToolTipText("Add a New Trace Breakpoint"); + msg = (isJapanese) ? "�u���[�N�|�C���g��lj�����" : "Add a New Breakpoint"; + addTraceBreakPointAction.setText(msg); + addTraceBreakPointAction.setToolTipText(msg); removeTraceBreakPointAction = new Action() { @Override @@ -163,8 +174,9 @@ debuggingController.removeTraceBreakPointAction(); } }; - removeTraceBreakPointAction.setText("Remove a Trace Breakpoint"); - removeTraceBreakPointAction.setToolTipText("Remove a Trace Breakpoint"); + msg = (isJapanese) ? "�u���[�N�|�C���g���폜����" : "Remove a Breakpoint"; + removeTraceBreakPointAction.setText(msg); + removeTraceBreakPointAction.setToolTipText(msg); importBreakpointAction = new Action() { @Override @@ -172,8 +184,9 @@ debuggingController.importBreakpointAction(); } }; - importBreakpointAction.setText("Import Breakpoints"); - importBreakpointAction.setToolTipText("Copy Breakpoints from Eclipse"); + msg = (isJapanese) ? "�u���[�N�|�C���g�� Eclipse ����������" : "Import Breakpoints from Eclipse"; + importBreakpointAction.setText(msg); + importBreakpointAction.setToolTipText(msg); ImageDescriptor importBreakpointIcon = registry.getDescriptor(IMPORT_BREAKPOINT_DLCL); importBreakpointAction.setImageDescriptor(importBreakpointIcon); @@ -183,8 +196,9 @@ debuggingController.debugAction(); } }; - debugAction.setText("Debug"); - debugAction.setToolTipText("Debug"); + msg = (isJapanese) ? "�f�o�b�O" : "Debug"; + debugAction.setText(msg); + debugAction.setToolTipText(msg); ImageDescriptor debugIcon = registry.getDescriptor(DEBUG_DLCL); debugAction.setImageDescriptor(debugIcon); @@ -194,8 +208,9 @@ debuggingController.terminateAction(); } }; - terminateAction.setText("Terminate"); - terminateAction.setToolTipText("Terminate"); + msg = (isJapanese) ? "�I��" : "Terminate"; + terminateAction.setText(msg); + terminateAction.setToolTipText(msg); ImageDescriptor terminateImage = DebugUITools.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_TERMINATE); terminateAction.setImageDescriptor(terminateImage); @@ -205,8 +220,9 @@ debuggingController.stepIntoAction(); } }; - stepIntoAction.setText("Step Into"); - stepIntoAction.setToolTipText("Step Into"); + msg = (isJapanese) ? "�X�e�b�v�C��" : "Step Into"; + stepIntoAction.setText(msg); + stepIntoAction.setToolTipText(msg); ImageDescriptor stepIntoImage = DebugUITools.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_STEP_INTO); stepIntoAction.setImageDescriptor(stepIntoImage); @@ -216,8 +232,9 @@ debuggingController.stepOverAction(); } }; - stepOverAction.setText("Step Over"); - stepOverAction.setToolTipText("Step Over"); + msg = (isJapanese) ? "�X�e�b�v�I�[�o�[" : "Step Over"; + stepOverAction.setText(msg); + stepOverAction.setToolTipText(msg); ImageDescriptor stepOverImage = DebugUITools.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_STEP_OVER); stepOverAction.setImageDescriptor(stepOverImage); @@ -227,8 +244,9 @@ debuggingController.stepReturnAction(); } }; - stepReturnAction.setText("Step Return"); - stepReturnAction.setToolTipText("Step Return"); + msg = (isJapanese) ? "�X�e�b�v���^�[��" : "Step Return"; + stepReturnAction.setText(msg); + stepReturnAction.setToolTipText(msg); ImageDescriptor stepReturnImage = DebugUITools.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_STEP_RETURN); stepReturnAction.setImageDescriptor(stepReturnImage); @@ -238,8 +256,9 @@ debuggingController.stepNextAction(); } }; - stepNextAction.setText("Step Next"); - stepNextAction.setToolTipText("Step Next"); + msg = (isJapanese) ? "�X�e�b�v�l�N�X�g" : "Step Next"; + stepNextAction.setText(msg); + stepNextAction.setToolTipText(msg); ImageDescriptor stepNextIcon = registry.getDescriptor(STEP_NEXT_DLCL); stepNextAction.setImageDescriptor(stepNextIcon); @@ -249,8 +268,9 @@ debuggingController.resumeAction(); } }; - resumeAction.setText("Resume"); - resumeAction.setToolTipText("Resume"); + msg = (isJapanese) ? "�ĊJ" : "Resume"; + resumeAction.setText(msg); + resumeAction.setToolTipText(msg); ImageDescriptor image = DebugUITools.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_RESUME); resumeAction.setImageDescriptor(image); } diff --git a/src/org/ntlab/traceDebugger/BreakPointViewRelatedDelta.java b/src/org/ntlab/traceDebugger/BreakPointViewRelatedDelta.java index 62ec337..2ef6840 100644 --- a/src/org/ntlab/traceDebugger/BreakPointViewRelatedDelta.java +++ b/src/org/ntlab/traceDebugger/BreakPointViewRelatedDelta.java @@ -47,15 +47,19 @@ @Override protected void createActions() { super.createActions(); - ImageRegistry registry = TraceDebuggerPlugin.getDefault().getImageRegistry(); + ImageRegistry registry = TraceDebuggerPlugin.getDefault().getImageRegistry(); + boolean isJapanese = TraceDebuggerPlugin.isJapanese(); + String msg; + backResumeAction = new Action() { @Override public void run() { debuggingController.backResumeAction(); } }; - backResumeAction.setText("Back Resume"); - backResumeAction.setToolTipText("Back Resume"); + msg = (isJapanese) ? "�t�����ɍĊJ" : "Back Resume"; + backResumeAction.setText(msg); + backResumeAction.setToolTipText(msg); ImageDescriptor backResumeIcon = registry.getDescriptor(BACK_RESUME_DLCL); backResumeAction.setImageDescriptor(backResumeIcon); @@ -65,8 +69,9 @@ debuggingController.stepBackIntoAction(); } }; - stepBackIntoAction.setText("Step Back Into"); - stepBackIntoAction.setToolTipText("Step Back Into"); + msg = (isJapanese) ? "�X�e�b�v�o�b�N�C��" : "Step Back Into"; + stepBackIntoAction.setText(msg); + stepBackIntoAction.setToolTipText(msg); ImageDescriptor stepBackIntoIcon = registry.getDescriptor(STEP_BACK_INTO_DLCL); stepBackIntoAction.setImageDescriptor(stepBackIntoIcon); @@ -76,8 +81,9 @@ debuggingController.stepBackOverAction(); } }; - stepBackOverAction.setText("Step Back Over"); - stepBackOverAction.setToolTipText("Step Back Over"); + msg = (isJapanese) ? "�X�e�b�v�o�b�N�I�[�o�[" : "Step Back Over"; + stepBackOverAction.setText(msg); + stepBackOverAction.setToolTipText(msg); ImageDescriptor stepBackOverIcon = registry.getDescriptor(STEP_BACK_OVER_DLCL); stepBackOverAction.setImageDescriptor(stepBackOverIcon); @@ -87,8 +93,9 @@ debuggingController.stepBackReturnAction(); } }; - stepBackReturnAction.setText("Step Back Return"); - stepBackReturnAction.setToolTipText("Step Back Return"); + msg = (isJapanese) ? "�X�e�b�v�o�b�N���^�[��" : "Step Back Return"; + stepBackReturnAction.setText(msg); + stepBackReturnAction.setToolTipText(msg); ImageDescriptor stepBackReturnIcon = registry.getDescriptor(STEP_BACK_RETURN_DLCL); stepBackReturnAction.setImageDescriptor(stepBackReturnIcon); } diff --git a/src/org/ntlab/traceDebugger/CallStackLabelProvider.java b/src/org/ntlab/traceDebugger/CallStackLabelProvider.java index bb84793..9b28a5f 100644 --- a/src/org/ntlab/traceDebugger/CallStackLabelProvider.java +++ b/src/org/ntlab/traceDebugger/CallStackLabelProvider.java @@ -1,17 +1,12 @@ package org.ntlab.traceDebugger; -import org.eclipse.debug.core.DebugPlugin; import org.eclipse.debug.ui.DebugUITools; import org.eclipse.debug.ui.IDebugUIConstants; import org.eclipse.jface.viewers.IColorProvider; import org.eclipse.jface.viewers.LabelProvider; import org.eclipse.jface.viewers.TreeNode; -import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.Image; -import org.eclipse.swt.widgets.Display; -import org.eclipse.ui.ISharedImages; -import org.eclipse.ui.PlatformUI; public class CallStackLabelProvider extends LabelProvider implements IColorProvider { @@ -21,13 +16,14 @@ Object value = ((TreeNode)element).getValue(); if (value instanceof String) { String threadId = (String)value; - return "ThreadID: " + threadId; + String msg = TraceDebuggerPlugin.isJapanese() ? "�X���b�hID: " : "Thread ID: "; + return msg + threadId; } if (value instanceof CallStackModel) { CallStackModel callStackModel = (CallStackModel)value; StringBuilder text = new StringBuilder(); text.append(callStackModel.getCallStackSignature()); - text.append(" line: "); + text.append(TraceDebuggerPlugin.isJapanese() ? " �s: " : " line: "); text.append(callStackModel.getCallLineNo()); return text.toString(); } diff --git a/src/org/ntlab/traceDebugger/CallStackView.java b/src/org/ntlab/traceDebugger/CallStackView.java index 6064419..84ffb23 100644 --- a/src/org/ntlab/traceDebugger/CallStackView.java +++ b/src/org/ntlab/traceDebugger/CallStackView.java @@ -3,7 +3,6 @@ import java.util.List; import java.util.Map; -import org.eclipse.core.resources.IMarker; import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.action.IToolBarManager; import org.eclipse.jface.viewers.ISelectionChangedListener; @@ -16,9 +15,6 @@ import org.eclipse.ui.part.ViewPart; import org.ntlab.traceAnalysisPlatform.tracer.trace.MethodExecution; import org.ntlab.traceAnalysisPlatform.tracer.trace.TracePoint; -import org.ntlab.traceDebugger.analyzerProvider.AbstractAnalyzer; -import org.ntlab.traceDebugger.analyzerProvider.DeltaExtractionAnalyzer; -import org.ntlab.traceDebugger.analyzerProvider.DeltaMarkerManager; public class CallStackView extends ViewPart { protected TreeViewer viewer; @@ -64,6 +60,11 @@ createPopupMenu(); TraceDebuggerPlugin.setActiveView(ID, this); } + + @Override + public String getTitle() { + return TraceDebuggerPlugin.isJapanese() ? "�Ăяo���X�^�b�N" : "CallStack"; + } @Override public void setFocus() { diff --git a/src/org/ntlab/traceDebugger/CallStackViewRelatedDelta.java b/src/org/ntlab/traceDebugger/CallStackViewRelatedDelta.java index c97c4ff..677fe67 100644 --- a/src/org/ntlab/traceDebugger/CallStackViewRelatedDelta.java +++ b/src/org/ntlab/traceDebugger/CallStackViewRelatedDelta.java @@ -79,7 +79,8 @@ String calleeId = callee.getThisObjId(); String calleeClassName = callee.getThisClassName(); calleeClassName = calleeClassName.substring(calleeClassName.lastIndexOf(".") + 1); - String text = String.format("Extract Delta (%s: %s �� %s: %s)", callerId, callerClassName, calleeId, calleeClassName); + String msg = TraceDebuggerPlugin.isJapanese() ? "�I�u�W�F�N�g�̐ڋ߉ߒ����o" : "Extract Process to Relate"; + String text = String.format("%s (%s: %s �� %s: %s)", msg, callerId, callerClassName, calleeId, calleeClassName); deltaAction.setText(text); deltaAction.setToolTipText(text); manager.add(deltaAction); diff --git a/src/org/ntlab/traceDebugger/CallTreeView.java b/src/org/ntlab/traceDebugger/CallTreeView.java index 73e8f94..d79a2a6 100644 --- a/src/org/ntlab/traceDebugger/CallTreeView.java +++ b/src/org/ntlab/traceDebugger/CallTreeView.java @@ -15,8 +15,6 @@ import org.eclipse.ui.part.ViewPart; import org.ntlab.traceAnalysisPlatform.tracer.trace.MethodExecution; import org.ntlab.traceAnalysisPlatform.tracer.trace.TracePoint; -import org.ntlab.traceDebugger.analyzerProvider.AbstractAnalyzer; -import org.ntlab.traceDebugger.analyzerProvider.DeltaExtractionAnalyzer; import org.ntlab.traceDebugger.analyzerProvider.DeltaMarkerManager; public class CallTreeView extends ViewPart { @@ -73,6 +71,11 @@ createMenuBar(); TraceDebuggerPlugin.setActiveView(ID, this); } + + @Override + public String getTitle() { + return TraceDebuggerPlugin.isJapanese() ? "���݂̎��s���_" : "CurrentExecutionPoint"; + } @Override public void setFocus() { diff --git a/src/org/ntlab/traceDebugger/DebuggingController.java b/src/org/ntlab/traceDebugger/DebuggingController.java index 87d3598..7b8c78a 100644 --- a/src/org/ntlab/traceDebugger/DebuggingController.java +++ b/src/org/ntlab/traceDebugger/DebuggingController.java @@ -72,15 +72,23 @@ public boolean fileOpenAction(Shell shell) { if (loadingTraceFileStatus == LoadingTraceFileStatus.PROGRESS) { - MessageDialog.openInformation(null, "Loading", "This debugger is loading the trace."); + if (TraceDebuggerPlugin.isJapanese()) { + MessageDialog.openInformation(null, "�ǂݍ��ݒ�", "�g���[�X�t�@�C����ǂݍ��ݒ��ł�"); + } else { + MessageDialog.openInformation(null, "Loading", "This debugger is loading the trace."); + } return false; } if (isRunning) { - MessageDialog.openInformation(null, "Running", "This debugger is running on the trace."); + if (TraceDebuggerPlugin.isJapanese()) { + MessageDialog.openInformation(null, "���s��", "�g���[�X��Ŏ��s���ł�"); + } else { + MessageDialog.openInformation(null, "Running", "This debugger is running on the trace."); + } return false; } FileDialog fileDialog = new FileDialog(shell, SWT.OPEN); - fileDialog.setText("Open Trace File"); + fileDialog.setText(TraceDebuggerPlugin.isJapanese() ? "�g���[�X�t�@�C�����J��" : "Open Trace File"); fileDialog.setFilterExtensions(new String[]{"*.*"}); String path = fileDialog.open(); if (path == null) return false; @@ -96,10 +104,11 @@ } private void loadTraceFileOnOtherThread(final String filePath) { - Job job = new Job("Loading Trace File") { + final String msg = TraceDebuggerPlugin.isJapanese() ? "�g���[�X�t�@�C����ǂݍ��ݒ�" : "Loading Trace File"; + Job job = new Job(msg) { @Override - protected IStatus run(IProgressMonitor monitor) { - monitor.beginTask("Loading Trace File" + " (" + filePath + ")", IProgressMonitor.UNKNOWN); + protected IStatus run(IProgressMonitor monitor) { + monitor.beginTask(msg + " (" + filePath + ")", IProgressMonitor.UNKNOWN); loadingTraceFileStatus = LoadingTraceFileStatus.PROGRESS; TraceDebuggerPlugin.setAnalyzer(null); TraceJSON trace = new TraceJSON(filePath); @@ -133,19 +142,29 @@ public boolean addTraceBreakPointAction() { if (loadingTraceFileStatus != LoadingTraceFileStatus.DONE) { - MessageDialog.openInformation(null, "Error", "Trace file was not found"); + if (TraceDebuggerPlugin.isJapanese()) { + MessageDialog.openInformation(null, "�G���[", "�g���[�X�����‚���܂���ł���"); + } else { + MessageDialog.openInformation(null, "Error", "Trace was not found"); + } return false; } - InputDialog inputDialog = new InputDialog(null, "method signature dialog", "Input method signature", "", null); + InputDialog inputDialog = TraceDebuggerPlugin.isJapanese() ? new InputDialog(null, "���\�b�h�_�C�A���O", "���\�b�h�V�O�j�`�������", "", null) + : new InputDialog(null, "method signature dialog", "Input method signature", "", null); if (inputDialog.open() != InputDialog.OK) return false; String methodSignature = inputDialog.getValue(); - inputDialog = new InputDialog(null, "line No dialog", "Input line no", "", null); + inputDialog = TraceDebuggerPlugin.isJapanese() ? new InputDialog(null, "�s���_�C�A���O", "�s�������", "", null) + : new InputDialog(null, "line Number dialog", "Input line number", "", null); if (inputDialog.open() != InputDialog.OK) return false; int lineNo = Integer.parseInt(inputDialog.getValue()); TraceBreakPoints traceBreakPoints = ((BreakPointView)TraceDebuggerPlugin.getActiveView(BreakPointView.ID)).getTraceBreakPoints(); boolean isSuccess = traceBreakPoints.addTraceBreakPoint(methodSignature, lineNo); if (!isSuccess) { - MessageDialog.openInformation(null, "Error", "This trace point does not exist in the trace."); + if (TraceDebuggerPlugin.isJapanese()) { + MessageDialog.openInformation(null, "�G���[", "�g���[�X���ɓ��͂����|�C���g�����݂��܂���"); + } else { + MessageDialog.openInformation(null, "Error", "This point does not exist in the trace."); + } return false; } ((BreakPointView)TraceDebuggerPlugin.getActiveView(BreakPointView.ID)).updateTraceBreakPoints(traceBreakPoints); @@ -154,7 +173,11 @@ public boolean importBreakpointAction() { if (loadingTraceFileStatus != LoadingTraceFileStatus.DONE) { - MessageDialog.openInformation(null, "Error", "Trace file was not found"); + if (TraceDebuggerPlugin.isJapanese()) { + MessageDialog.openInformation(null, "�G���[", "�g���[�X�����‚���܂���"); + } else { + MessageDialog.openInformation(null, "Error", "Trace was not found"); + } return false; } TraceBreakPoints traceBreakPoints = ((BreakPointView)TraceDebuggerPlugin.getActiveView(BreakPointView.ID)).getTraceBreakPoints(); @@ -173,17 +196,29 @@ public boolean debugAction() { if (loadingTraceFileStatus != LoadingTraceFileStatus.DONE) { - MessageDialog.openInformation(null, "Error", "Trace file was not found"); + if (TraceDebuggerPlugin.isJapanese()) { + MessageDialog.openInformation(null, "�G���[", "�g���[�X�����‚���܂���"); + } else { + MessageDialog.openInformation(null, "Error", "Trace was not found"); + } return false; } if (isRunning) { - MessageDialog.openInformation(null, "Error", "This Debugger is running"); + if (TraceDebuggerPlugin.isJapanese()) { + MessageDialog.openInformation(null, "�G���[", "�g���[�X��Ŏ��s���ł�"); + } else { + MessageDialog.openInformation(null, "Error", "This Debugger is running on the trace."); + } return false; } TraceBreakPoints traceBreakPoints = ((BreakPointView)TraceDebuggerPlugin.getActiveView(BreakPointView.ID)).getTraceBreakPoints(); debuggingTp = traceBreakPoints.getFirstTracePoint(); if (debuggingTp == null) { - MessageDialog.openInformation(null, "Error", "An available breakpoint was not found"); + if (TraceDebuggerPlugin.isJapanese()) { + MessageDialog.openInformation(null, "�G���[", "���p�”\�ȃu���[�N�|�C���g�����‚���܂���"); + } else { + MessageDialog.openInformation(null, "Error", "An available breakpoint was not found"); + } return false; } refresh(null, debuggingTp, false); @@ -217,11 +252,7 @@ TracePoint previousTp = debuggingTp; debuggingTp = debuggingTp.duplicate(); debuggingTp.stepFull(); - if (!debuggingTp.isValid()) { - terminateAction(); - MessageDialog.openInformation(null, "Terminate", "This trace is terminated"); - return false; - } + if (debugExecutionIsTerminated(debuggingTp)) return false; refresh(null, debuggingTp, false); return true; } @@ -260,11 +291,7 @@ while (!debuggingTp.stepOver()); // �Ăяo�����ł̎��̃X�e�[�g�����g�܂Ői�߂� } - if (!debuggingTp.isValid()) { - terminateAction(); - MessageDialog.openInformation(null, "Terminate", "This trace is terminated"); - return false; - } + if (debugExecutionIsTerminated(debuggingTp)) return false; refresh(previousTp, debuggingTp, isReturned, true); return true; } @@ -284,11 +311,8 @@ previousTp = debuggingTp.duplicate(); } while (!debuggingTp.stepOver()); // �Ăяo�����ł̎��̃X�e�[�g�����g�܂Ői�߂� - if (!debuggingTp.isValid()) { - terminateAction(); - MessageDialog.openInformation(null, "Terminate", "This trace is terminated"); - return false; - } + + if (debugExecutionIsTerminated(debuggingTp)) return false; refresh(previousTp, debuggingTp, true); return true; } @@ -320,11 +344,7 @@ while (!debuggingTp.stepOver()); // �Ăяo�����ł̎��̃X�e�[�g�����g�܂Ői�߂� } - if (!debuggingTp.isValid()) { - terminateAction(); - MessageDialog.openInformation(null, "Terminate", "This trace is terminated"); - return false; - } + if (debugExecutionIsTerminated(debuggingTp)) return false; refresh(previousTp, debuggingTp, isReturned, true); return true; } @@ -336,11 +356,7 @@ TracePoint previousTp = debuggingTp; TraceBreakPoints traceBreakPoints = ((BreakPointView)TraceDebuggerPlugin.getActiveView(BreakPointView.ID)).getTraceBreakPoints(); debuggingTp = traceBreakPoints.getNextTracePoint(currentTime); - if (debuggingTp == null) { - terminateAction(); - MessageDialog.openInformation(null, "Terminate", "This trace is terminated"); - return false; - } + if (debugExecutionIsTerminated(debuggingTp)) return false; refresh(null, debuggingTp, false); return true; } @@ -355,11 +371,7 @@ TracePoint previousTp = debuggingTp; debuggingTp = debuggingTp.duplicate(); debuggingTp.stepBackFull(); - if (!debuggingTp.isValid()) { - terminateAction(); - MessageDialog.openInformation(null, "Terminate", "This trace is terminated"); - return false; - } + if (debugExecutionIsTerminated(debuggingTp)) return false; refresh(null, debuggingTp, true); return true; } @@ -378,11 +390,7 @@ while (!(isReturned = !debuggingTp.stepBackOver())) { if (currentLineNo != debuggingTp.getStatement().getLineNo()) break; } - if (!debuggingTp.isValid()) { - terminateAction(); - MessageDialog.openInformation(null, "Terminate", "This trace is terminated"); - return false; - } + if (debugExecutionIsTerminated(debuggingTp)) return false; refresh(null, debuggingTp, !isReturned); return true; } @@ -397,11 +405,7 @@ TracePoint previousTp = debuggingTp; debuggingTp = debuggingTp.duplicate(); while (debuggingTp.stepBackOver()); - if (!debuggingTp.isValid()) { - terminateAction(); - MessageDialog.openInformation(null, "Terminate", "This trace is terminated"); - return false; - } + if (debugExecutionIsTerminated(debuggingTp)) return false; refresh(null, debuggingTp, false); return true; } @@ -413,14 +417,23 @@ long currentTime = debuggingTp.getStatement().getTimeStamp(); TraceBreakPoints traceBreakPoints = ((BreakPointView)TraceDebuggerPlugin.getActiveView(BreakPointView.ID)).getTraceBreakPoints(); debuggingTp = traceBreakPoints.getPreviousTracePoint(currentTime); - if (debuggingTp == null) { - terminateAction(); - MessageDialog.openInformation(null, "Terminate", "This trace is terminated"); - return false; - } + if (debugExecutionIsTerminated(debuggingTp)) return false; refresh(null, debuggingTp, false); return true; } + + private boolean debugExecutionIsTerminated(TracePoint tp) { + if (tp == null || !(tp.isValid())) { + terminateAction(); + if (TraceDebuggerPlugin.isJapanese()) { + MessageDialog.openInformation(null, "�I��", "�g���[�X��ł̎��s�͏I�����܂���"); + } else { + MessageDialog.openInformation(null, "Terminate", "This execution is terminated"); + } + return true; + } + return false; + } /** * ���݂̃f�o�b�O�ʒu���w�肵���g���[�X�|�C���g�ɍ��킹�� diff --git a/src/org/ntlab/traceDebugger/DeltaMarkerLabelProvider.java b/src/org/ntlab/traceDebugger/DeltaMarkerLabelProvider.java index ce8d510..95f68bd 100644 --- a/src/org/ntlab/traceDebugger/DeltaMarkerLabelProvider.java +++ b/src/org/ntlab/traceDebugger/DeltaMarkerLabelProvider.java @@ -9,6 +9,7 @@ import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Display; +import org.ntlab.traceDebugger.analyzerProvider.Alias.AliasType; import org.ntlab.traceDebugger.analyzerProvider.DeltaMarkerManager; public class DeltaMarkerLabelProvider extends LabelProvider implements ITableLabelProvider, ITableColorProvider { @@ -44,24 +45,9 @@ return simpleObjectTypeName.toString(); case 3: Object obj = marker.getAttribute(DeltaMarkerManager.DELTA_MARKER_ATR_ALIAS_TYPE); - if (obj == null) return null; - // note: �X�l�[�N�P�[�X���p�X�J���P�[�X(�������P��Ԃ��󔒂ŋ�؂�)�ɕς��� - String aliasType = obj.toString(); - aliasType = aliasType.toLowerCase().replace("_", " "); - StringBuilder sb = new StringBuilder(); - for (int index = -1;;) { - sb.append(aliasType.substring(index + 1, index + 2).toUpperCase()); - int nextIndex = aliasType.indexOf(" ", index + 1); - if (nextIndex == -1) { - sb.append(aliasType.substring(index + 2)); - break; - } else { - sb.append(aliasType.substring(index + 2, nextIndex + 1)); - index = nextIndex; - } - } - aliasType = sb.toString(); - return aliasType; + if (!(obj instanceof AliasType)) return null; + AliasType aliasType = (AliasType)obj; + return getAliasTypeName(aliasType); case 4: String resource = marker.getResource().toString(); return resource.substring(resource.lastIndexOf("/") + 1); @@ -76,14 +62,57 @@ return "�e�X�g�p�e�L�X�g"; } + private String getAliasTypeName(AliasType aliasType) { + String msg = aliasType.toString(); + switch (aliasType) { + case METHOD_INVOCATION: + case CONSTRACTOR_INVOCATION: + return TraceDebuggerPlugin.isJapanese() ? "�Ăяo����" : "Invocation"; + case RECEIVER: + return TraceDebuggerPlugin.isJapanese() ? "���V�[�o" : convertFromSnakeToPascal(msg); + case ACTUAL_ARGUMENT: + return TraceDebuggerPlugin.isJapanese() ? "������" : convertFromSnakeToPascal(msg); + case FORMAL_PARAMETER: + return TraceDebuggerPlugin.isJapanese() ? "������" : convertFromSnakeToPascal(msg); + case RETURN_VALUE: + return TraceDebuggerPlugin.isJapanese() ? "�߂�l" : convertFromSnakeToPascal(msg); + case THIS: + return TraceDebuggerPlugin.isJapanese() ? "this�̎Q��" : convertFromSnakeToPascal(msg); + case CONTAINER: + return TraceDebuggerPlugin.isJapanese() ? "�R���e�i�̎Q��" : convertFromSnakeToPascal(msg); + case FIELD: + return TraceDebuggerPlugin.isJapanese() ? "�t�B�[���h�Q��" : convertFromSnakeToPascal(msg); + case ARRAY: + return TraceDebuggerPlugin.isJapanese() ? "�z��Q��" : convertFromSnakeToPascal(msg); + case ARRAY_ELEMENT: + return TraceDebuggerPlugin.isJapanese() ? "�z��v�f�Q��" : convertFromSnakeToPascal(msg); + case ARRAY_CREATE: + return TraceDebuggerPlugin.isJapanese() ? "�z�񐶐���" : convertFromSnakeToPascal(msg); + default: + return ""; + } + } + + private String convertFromSnakeToPascal(String str) { + // note: �X�l�[�N�P�[�X���p�X�J���P�[�X(�������P��Ԃ��󔒂ŋ�؂�)�ɕς��� + String base = str.toLowerCase().replace("_", " "); + StringBuilder sb = new StringBuilder(); + for (int index = -1;;) { + sb.append(base.substring(index + 1, index + 2).toUpperCase()); + int nextIndex = base.indexOf(" ", index + 1); + if (nextIndex == -1) { + sb.append(base.substring(index + 2)); + break; + } else { + sb.append(base.substring(index + 2, nextIndex + 1)); + index = nextIndex; + } + } + return sb.toString(); + } + @Override public Image getColumnImage(Object element, int columnIndex) { -// if (element instanceof TreeNode) { -// Object value = ((TreeNode)element).getValue(); -// if (value instanceof String && columnIndex == 0) { -// return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_ELEMENT); -// } -// } return null; } diff --git a/src/org/ntlab/traceDebugger/DeltaMarkerView.java b/src/org/ntlab/traceDebugger/DeltaMarkerView.java index 55311ce..04cd525 100644 --- a/src/org/ntlab/traceDebugger/DeltaMarkerView.java +++ b/src/org/ntlab/traceDebugger/DeltaMarkerView.java @@ -46,7 +46,8 @@ tree.setLinesVisible(true); // �e�[�u���̃J�������쐬 - String[] tableColumnTexts = {"Description", "Object ID", "Type", "Alias", "Source", "Line"}; + String[] tableColumnTexts = TraceDebuggerPlugin.isJapanese() ? new String[]{"���s���_", "id", "�^", "�o���`��", "�\�[�X", "�s"} + : new String[]{"ExecutionPoint", "id", "Type", "Occurrence", "Source", "Line"}; int[] tableColumnWidth = {120, 100, 120, 120, 100, 80}; TreeColumn[] tableColumns = new TreeColumn[tableColumnTexts.length]; for (int i = 0; i < tableColumns.length; i++) { @@ -79,6 +80,11 @@ TraceDebuggerPlugin.setActiveView(ID, this); } + @Override + public String getTitle() { + return TraceDebuggerPlugin.isJapanese() ? "�I�u�W�F�N�g�̐ڋ߉ߒ�" : "Process to Relate"; + } + private void createActions() { // TODO Auto-generated method stub } @@ -102,7 +108,6 @@ if (!doNotUpdateCallTreeView) { CallTreeView callTreeView = (CallTreeView)TraceDebuggerPlugin.getActiveView(CallTreeView.ID); callTreeView.update(deltaMarkerManager); -// updateOtherViewsByMarker(selectionMarker); } doNotUpdateCallTreeView = false; viewer.getControl().setFocus(); @@ -201,35 +206,5 @@ callTreeView.highlight(bottomME); TracePointsView tracePointsView = (TracePointsView)TraceDebuggerPlugin.getActiveView(TracePointsView.ID); tracePointsView.addTracePoint(creationPoint); - } - -// public void extractDelta(Variable variable, boolean isContainerToComponent) { -// AbstractAnalyzer analyzer = TraceDebuggerPlugin.getAnalyzer(); -// if (analyzer instanceof DeltaExtractionAnalyzer) { -// DeltaExtractionAnalyzer deltaAnalyzer = (DeltaExtractionAnalyzer)analyzer; -// if (isContainerToComponent) { -// deltaMarkerManager = deltaAnalyzer.extractDeltaForContainerToComponent(variable); -// } else { -// deltaMarkerManager = deltaAnalyzer.extractDeltaForThisToAnother(variable); -// } -// deltaMarkerManager.createMarkerAndOpenJavaFileForAll(); // �f���^���o�̌��ʂ����Ƀ\�[�X�R�[�h�𔽓]�\������ -// update(); -// -// TracePoint coordinatorPoint = getCoordinatorPoint(); -// TracePoint creationPoint = getCreationPoint(); -// MethodExecution coordinatorME = coordinatorPoint.getMethodExecution(); -// MethodExecution bottomME = creationPoint.getMethodExecution(); -// DebuggingController controller = DebuggingController.getInstance(); -// controller.jumpToTheTracePoint(creationPoint, false); -// VariableViewRelatedDelta variableView = (VariableViewRelatedDelta)(TraceDebuggerPlugin.getActiveView(VariableViewRelatedDelta.ID)); -// variableView.markAndExpandVariablesByDeltaMarkers(deltaMarkerManager.getMarkers()); -// CallStackView callStackView = (CallStackView)TraceDebuggerPlugin.getActiveView(CallStackView.ID); -// callStackView.highlight(coordinatorME); -// CallTreeView callTreeView = (CallTreeView)TraceDebuggerPlugin.getActiveView(CallTreeView.ID); -// callTreeView.update(deltaMarkerManager); -// callTreeView.highlight(bottomME); -// TracePointsView tracePointsView = (TracePointsView)TraceDebuggerPlugin.getActiveView(TracePointsView.ID); -// tracePointsView.addTracePoint(creationPoint); -// } -// } + } } diff --git a/src/org/ntlab/traceDebugger/TraceDebuggerPlugin.java b/src/org/ntlab/traceDebugger/TraceDebuggerPlugin.java index 8e05623..4c1399c 100644 --- a/src/org/ntlab/traceDebugger/TraceDebuggerPlugin.java +++ b/src/org/ntlab/traceDebugger/TraceDebuggerPlugin.java @@ -34,6 +34,8 @@ // The shared instance private static TraceDebuggerPlugin plugin; + private static boolean isJapanese = true; + /** * The constructor */ @@ -139,4 +141,8 @@ public static ImageDescriptor getImageDescriptor(String path) { return imageDescriptorFromPlugin(PLUGIN_ID, path); } + + public static boolean isJapanese() { + return isJapanese; + } } diff --git a/src/org/ntlab/traceDebugger/TracePointsView.java b/src/org/ntlab/traceDebugger/TracePointsView.java index 0bb3b5c..0c5df4b 100644 --- a/src/org/ntlab/traceDebugger/TracePointsView.java +++ b/src/org/ntlab/traceDebugger/TracePointsView.java @@ -1,8 +1,5 @@ package org.ntlab.traceDebugger; -import java.util.List; -import java.util.Map; - import org.eclipse.core.resources.IMarker; import org.eclipse.jface.action.Action; import org.eclipse.jface.action.IAction; @@ -26,9 +23,6 @@ import org.eclipse.ui.part.ViewPart; import org.ntlab.traceAnalysisPlatform.tracer.trace.MethodExecution; import org.ntlab.traceAnalysisPlatform.tracer.trace.TracePoint; -import org.ntlab.traceDebugger.analyzerProvider.AbstractAnalyzer; -import org.ntlab.traceDebugger.analyzerProvider.DeltaExtractionAnalyzer; -import org.ntlab.traceDebugger.analyzerProvider.DeltaMarkerManager; public class TracePointsView extends ViewPart { private TableViewer viewer; @@ -56,7 +50,8 @@ table.setLinesVisible(true); // �e�[�u���̃J�������쐬 - String[] tableColumnTexts = {"Line", "Signature"}; + String[] tableColumnTexts = TraceDebuggerPlugin.isJapanese() ? new String[]{"�s", "���\�b�h"} + : new String[]{"Line", "Signature"}; int[] tableColumnWidth = {80, 1000}; TableColumn[] tableColumns = new TableColumn[tableColumnTexts.length]; for (int i = 0; i < tableColumns.length; i++) { @@ -99,6 +94,11 @@ createPopupMenu(); TraceDebuggerPlugin.setActiveView(ID, this); } + + @Override + public String getTitle() { + return TraceDebuggerPlugin.isJapanese() ? "���s���_�̓o�^" : "MarkedExecutionPoints"; + } @Override public void setFocus() { @@ -107,7 +107,10 @@ viewer.getControl().setFocus(); } - private void createActions() { + private void createActions() { + boolean isJapanese = TraceDebuggerPlugin.isJapanese(); + String msg; + addAction = new Action() { @Override public void run() { @@ -116,8 +119,9 @@ addTracePoint(currentTp); } }; - addAction.setText("Add"); - addAction.setToolTipText("Add"); + msg = (isJapanese) ? "�lj�" : "Add"; + addAction.setText(msg); + addAction.setToolTipText(msg); removeAction = new Action() { @Override @@ -128,8 +132,9 @@ } } }; - removeAction.setText("Remove"); - removeAction.setToolTipText("Remove"); + msg = (isJapanese) ? "�폜" : "Remove"; + removeAction.setText(msg); + removeAction.setToolTipText(msg); jumpAction = new Action() { @Override @@ -139,8 +144,9 @@ } } }; - jumpAction.setText("Jump"); - jumpAction.setToolTipText("Jump"); + msg = (isJapanese) ? "�W�����v" : "Jump"; + jumpAction.setText(msg); + jumpAction.setToolTipText(msg); } private void createToolBar() { diff --git a/src/org/ntlab/traceDebugger/Variable.java b/src/org/ntlab/traceDebugger/Variable.java index 60e2185..995cc31 100644 --- a/src/org/ntlab/traceDebugger/Variable.java +++ b/src/org/ntlab/traceDebugger/Variable.java @@ -36,11 +36,11 @@ private boolean alreadyCreatedGrandChildHierarchy = false; private Map additionalAttributes = new HashMap<>(); public static final String NULL_VALUE = "null"; - public static final String RETURN_VARIABLE_NAME = "return"; - public static final String ARG_VARIABLE_NAME = "arg"; - public static final String RECEIVER_VARIABLE_NAME = "receiver"; - public static final String VALUE_VARIABLE_NAME = "value"; - public static final String CONTAINER_VARIABLE_NAME = "container"; + public static final String RETURN_VARIABLE_NAME = TraceDebuggerPlugin.isJapanese() ? "�߂�l" : "return"; + public static final String ARG_VARIABLE_NAME = TraceDebuggerPlugin.isJapanese() ? "����" : "arg"; + public static final String RECEIVER_VARIABLE_NAME = TraceDebuggerPlugin.isJapanese() ? "���V�[�o" : "receiver"; + public static final String VALUE_VARIABLE_NAME = TraceDebuggerPlugin.isJapanese() ? "�R���|�[�l���g" : "value"; + public static final String CONTAINER_VARIABLE_NAME = TraceDebuggerPlugin.isJapanese() ? "�R���e�i" : "container"; public enum VariableType { USE_VALUE, USE_CONTAINER, USE_RECEIVER, USE_RETURN, diff --git a/src/org/ntlab/traceDebugger/VariableLabelProvider.java b/src/org/ntlab/traceDebugger/VariableLabelProvider.java index 8c2dbfa..248f8c3 100644 --- a/src/org/ntlab/traceDebugger/VariableLabelProvider.java +++ b/src/org/ntlab/traceDebugger/VariableLabelProvider.java @@ -24,16 +24,18 @@ Object value = ((TreeNode)element).getValue(); if (value instanceof String) { String name = (String)value; + String constructorMsg = TraceDebuggerPlugin.isJapanese() ? "�R���X�g���N�^" : "Constructor"; switch (columnIndex) { - case 0: - if (name.contains("Constructor")) { - return name.substring(0, name.indexOf("Constructor")); + case 0: { + if (name.contains(constructorMsg)) { + return name.substring(0, name.indexOf(constructorMsg)); } return name.substring(0, name.indexOf(":")); + } case 1: String valueName = name.substring(name.indexOf(":") + 1); valueName = valueName.substring(valueName.lastIndexOf(" ") + 1); - boolean isConstructor = name.contains("Constructor"); + boolean isConstructor = name.contains(constructorMsg); return getReadableName(valueName, isConstructor); } } diff --git a/src/org/ntlab/traceDebugger/VariableView.java b/src/org/ntlab/traceDebugger/VariableView.java index 9bc8fae..7b2404c 100644 --- a/src/org/ntlab/traceDebugger/VariableView.java +++ b/src/org/ntlab/traceDebugger/VariableView.java @@ -38,7 +38,7 @@ tree.setHeaderVisible(true); tree.setLinesVisible(true); - String[] treeColumnTexts = {"Name", "Value"}; + String[] treeColumnTexts = (TraceDebuggerPlugin.isJapanese()) ? new String[]{"���O", "�l"} : new String[]{"Name", "Value"}; int[] treeColumnWidth = {200, 300}; TreeColumn[] treeColumns = new TreeColumn[treeColumnTexts.length]; for (int i = 0; i < treeColumns.length; i++) { @@ -99,6 +99,11 @@ } @Override + public String getTitle() { + return TraceDebuggerPlugin.isJapanese() ? "�ϐ�" : "Variables"; + } + + @Override public void setFocus() { // TODO Auto-generated method stub TraceDebuggerPlugin.setActiveView(ID, this); diff --git a/src/org/ntlab/traceDebugger/VariableViewRelatedDelta.java b/src/org/ntlab/traceDebugger/VariableViewRelatedDelta.java index 78b0af8..4303f63 100644 --- a/src/org/ntlab/traceDebugger/VariableViewRelatedDelta.java +++ b/src/org/ntlab/traceDebugger/VariableViewRelatedDelta.java @@ -66,8 +66,6 @@ controller.jumpToTheTracePoint(jumpPoint, false); } }; - jumpAction.setText("Jump to Definition"); - jumpAction.setToolTipText("Jump to Definition"); deltaActionForContainerToComponent = new Action() { @Override @@ -76,8 +74,6 @@ newDeltaMarkerView.extractDeltaForContainerToComponent(selectedVariable); } }; - deltaActionForContainerToComponent.setText("Extract Delta"); - deltaActionForContainerToComponent.setToolTipText("Extract Delta"); deltaActionForThisToAnother = new Action() { @Override @@ -98,8 +94,6 @@ newDeltaMarkerView.extractDeltaForThisToAnother(thisId, thisClassName, anotherId, anotherClassName, before); } }; - deltaActionForThisToAnother.setText("Extract Delta"); - deltaActionForThisToAnother.setToolTipText("Extract Delta"); } private TracePoint findJumpPoint(Variable variable, TracePoint before) { @@ -161,15 +155,17 @@ VariableType variableType = selectedVariable.getVariableType(); if (variableType.equals(VariableType.USE_VALUE)) { manager.add(jumpAction); - jumpAction.setText("Jump to Definition"); - jumpAction.setToolTipText("Jump to Definition"); + String msg = TraceDebuggerPlugin.isJapanese() ? "�l�̑�����_�ɔ��" : "Back to Value Stored Moment"; + jumpAction.setText(msg); + jumpAction.setToolTipText(msg); } else if (variableType.equals(VariableType.USE_RETURN)) { manager.add(jumpAction); if (updateDeltaActionForThisToAnotherTexts(selectedVariable)) { manager.add(deltaActionForThisToAnother); } - jumpAction.setText("Jump to Addition"); - jumpAction.setToolTipText("Jump to Addition"); + String msg = TraceDebuggerPlugin.isJapanese() ? "�I�u�W�F�N�g�̒lj����_�ɔ��" : "Back to Object Added Moment"; + jumpAction.setText(msg); + jumpAction.setToolTipText(msg); } else if (variableType.isDef()) { if (updateDeltaActionForContainerToComponentTexts(selectedVariable)) { manager.add(deltaActionForContainerToComponent); @@ -203,7 +199,8 @@ String containerClassName = selectedVariable.getContainerClassName(); if (containerId != null && containerClassName != null) { containerClassName = containerClassName.substring(containerClassName.lastIndexOf(".") + 1); - String textForContainerToComponent = String.format("Extract Delta [ %s (id = %s) -> %s (id = %s) ]", containerClassName, containerId, valueClassName, valueId); + String msg = TraceDebuggerPlugin.isJapanese() ? "�I�u�W�F�N�g�̐ڋ߉ߒ����o" : "Extract Process to Relate"; + String textForContainerToComponent = String.format("%s [ %s (id = %s) -> %s (id = %s) ]", msg, containerClassName, containerId, valueClassName, valueId); deltaActionForContainerToComponent.setText(textForContainerToComponent); deltaActionForContainerToComponent.setToolTipText(textForContainerToComponent); return true; @@ -230,8 +227,9 @@ 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 (id = %s) -> %s (id = %s) ]", thisClassName, thisId, anotherClassName, anotherId); + thisClassName = thisClassName.substring(thisClassName.lastIndexOf(".") + 1); + String msg = TraceDebuggerPlugin.isJapanese() ? "�I�u�W�F�N�g�̐ڋ߉ߒ����o" : "Extract Process to Relate"; + String textForThisToAnother = String.format("%s [ %s (id = %s) -> %s (id = %s) ]", msg, thisClassName, thisId, anotherClassName, anotherId); deltaActionForThisToAnother.setText(textForThisToAnother); deltaActionForThisToAnother.setToolTipText(textForThisToAnother); return true; diff --git a/src/org/ntlab/traceDebugger/Variables.java b/src/org/ntlab/traceDebugger/Variables.java index a389269..13cd031 100644 --- a/src/org/ntlab/traceDebugger/Variables.java +++ b/src/org/ntlab/traceDebugger/Variables.java @@ -75,7 +75,6 @@ String thisObjId = methodExecution.getThisObjId(); String thisClassName = methodExecution.getThisClassName(); if (before == null) before = tp; -// Variable variable = new Variable("this", null, null, thisClassName, thisObjId, before, isReturned); Variable variable = new Variable("this", null, null, thisClassName, thisObjId, before, isReturned, VariableType.THIS); roots.add(variable); variable.createNextHierarchyState(); @@ -226,7 +225,8 @@ Variable value = new Variable(Variable.VALUE_VARIABLE_NAME, containerClassName, containerObjId, valueClassName, valueObjId, from, isReturned, VariableType.USE_VALUE); specialVariablesOfUseSide.add(container); specialVariablesOfUseSide.add(value); - parentNodeNameOfUseSide = "after field get of:" + fa.getFieldName(); + parentNodeNameOfUseSide = TraceDebuggerPlugin.isJapanese() ? "�t�B�[���h�Q�ƌ�:" : "after field get of:"; + parentNodeNameOfUseSide += fa.getFieldName(); } else if (fromStatement instanceof MethodInvocation) { MethodInvocation mi = (MethodInvocation)fromStatement; MethodExecution calledME = mi.getCalledMethodExecution(); @@ -241,9 +241,11 @@ specialVariablesOfUseSide.add(receiver); specialVariablesOfUseSide.add(returned); if (calledME.isConstructor()) { - parentNodeNameOfUseSide = "after invocation of Constructor:" + calledME.getSignature(); + parentNodeNameOfUseSide = TraceDebuggerPlugin.isJapanese() ? "�Ăяo���� �R���X�g���N�^:" : "after invocation of Constructor:"; + parentNodeNameOfUseSide += calledME.getSignature(); } else { - parentNodeNameOfUseSide = "after invocation of:" + calledME.getSignature(); + parentNodeNameOfUseSide = TraceDebuggerPlugin.isJapanese() ? "�Ăяo����:" : "after invocation of:"; + parentNodeNameOfUseSide += calledME.getSignature(); } } } @@ -262,7 +264,8 @@ Variable value = new Variable(Variable.VALUE_VARIABLE_NAME, containerClassName, containerObjId, valueClassName, valueObjId, to, isReturned, VariableType.DEF_VALUE); specialVariablesDefSide.add(container); specialVariablesDefSide.add(value); - parentNodeNameOfDefSide = "before field set of:" + fu.getFieldName(); + parentNodeNameOfDefSide = TraceDebuggerPlugin.isJapanese() ? "�t�B�[���h����O:" : "before field set of:"; + parentNodeNameOfDefSide += fu.getFieldName(); } else if (toStatement instanceof MethodInvocation) { MethodInvocation mi = (MethodInvocation)toStatement; MethodExecution calledME = mi.getCalledMethodExecution(); @@ -284,9 +287,11 @@ specialVariablesDefSide.add(arg); } if (calledME.isConstructor()) { - parentNodeNameOfDefSide = "before invocation of Constructor:" + calledME.getSignature(); + parentNodeNameOfDefSide = TraceDebuggerPlugin.isJapanese() ? "�Ăяo���O �R���X�g���N�^:" : "before invocation of Constructor:"; + parentNodeNameOfDefSide += calledME.getSignature(); } else { - parentNodeNameOfDefSide = "before invocation of:" + calledME.getSignature(); + parentNodeNameOfDefSide = TraceDebuggerPlugin.isJapanese() ? "�Ăяo���O:" : "before invocation of:"; + parentNodeNameOfDefSide += calledME.getSignature(); } } } diff --git a/src/org/ntlab/traceDebugger/analyzerProvider/DeltaMarkerManager.java b/src/org/ntlab/traceDebugger/analyzerProvider/DeltaMarkerManager.java index 532ee52..bed34a7 100644 --- a/src/org/ntlab/traceDebugger/analyzerProvider/DeltaMarkerManager.java +++ b/src/org/ntlab/traceDebugger/analyzerProvider/DeltaMarkerManager.java @@ -38,6 +38,7 @@ import org.ntlab.traceAnalysisPlatform.tracer.trace.TracePoint; import org.ntlab.traceDebugger.JavaEditorOperator; import org.ntlab.traceDebugger.JavaElementFinder; +import org.ntlab.traceDebugger.TraceDebuggerPlugin; public class DeltaMarkerManager { private Map> markerIdToMarkers = new HashMap<>(); @@ -73,7 +74,7 @@ public TreeNode[] getMarkerTreeNodes() { TreeNode[] roots = new TreeNode[] { new TreeNode(""), - new TreeNode("Related Aliases"), + new TreeNode(TraceDebuggerPlugin.isJapanese() ? "�ڋ߉ߒ�" : "Approach"), new TreeNode("") }; List markers; @@ -147,13 +148,15 @@ } public void createMarkerAndOpenJavaFileForAll() { - markAndOpenJavaFileForCoordinator(coordinator, "Coordinator", DeltaMarkerManager.COORDINATOR_DELTA_MARKER); + String msg = TraceDebuggerPlugin.isJapanese() ? "�J�n���_" : "InitialPoint"; + markAndOpenJavaFileForCoordinator(coordinator, msg, DeltaMarkerManager.COORDINATOR_DELTA_MARKER); List dstSideAliases = new ArrayList<>(aliasCollector.getDstSideRelatedAliases()); List srcSideAliases = new ArrayList<>(aliasCollector.getSrcSideRelatedAliases()); List> relatedAliasesList = new ArrayList<>(); relatedAliasesList.add(dstSideAliases); relatedAliasesList.add(srcSideAliases); - String[] messagesTemplates = {"GetterSide%03d", "SetterSide%03d"}; + String[] messagesTemplates = TraceDebuggerPlugin.isJapanese() ? new String[]{"�Q�Ɛ摤%03d", "�Q�ƌ���%03d"} + : new String[]{"ReferredSide%03d", "ReferringSide%03d"}; String[] markerIDList = {DST_SIDE_DELTA_MARKER, SRC_SIDE_DELTA_MARKER}; for (int i = 0; i < relatedAliasesList.size(); i++) { List relatedAliases = relatedAliasesList.get(i); @@ -164,7 +167,8 @@ markAndOpenJavaFileForAlias(alias, message, markerIDList[i]); } } - markAndOpenJavaFileForCreationPoint(relatedPoint, relatedPointReference, "RelatedPoint", DeltaMarkerManager.BOTTOM_DELTA_MARKER); + msg = TraceDebuggerPlugin.isJapanese() ? "�Q�Ǝ��_" : "RelatedPoint"; + markAndOpenJavaFileForCreationPoint(relatedPoint, relatedPointReference, msg, DeltaMarkerManager.BOTTOM_DELTA_MARKER); } private void markAndOpenJavaFileForAlias(Alias alias, String message, String markerId) {