diff --git a/icons/debug/debug_dlcl.png b/icons/debug/debug_dlcl.png new file mode 100644 index 0000000..9d50176 --- /dev/null +++ b/icons/debug/debug_dlcl.png Binary files differ diff --git a/icons/debug/debug_elcl.png b/icons/debug/debug_elcl.png new file mode 100644 index 0000000..6bd3c42 --- /dev/null +++ b/icons/debug/debug_elcl.png Binary files differ diff --git a/src/org/ntlab/traceDebugger/BreakPointView.java b/src/org/ntlab/traceDebugger/BreakPointView.java index 7517f30..5c3b35d 100644 --- a/src/org/ntlab/traceDebugger/BreakPointView.java +++ b/src/org/ntlab/traceDebugger/BreakPointView.java @@ -4,7 +4,6 @@ import org.eclipse.debug.internal.ui.IInternalDebugUIConstants; import org.eclipse.debug.ui.DebugUITools; -import org.eclipse.debug.ui.IDebugUIConstants; import org.eclipse.jface.action.Action; import org.eclipse.jface.action.IAction; import org.eclipse.jface.action.IMenuListener; @@ -24,8 +23,6 @@ import org.eclipse.swt.SWT; import org.eclipse.swt.events.MouseAdapter; import org.eclipse.swt.events.MouseEvent; -import org.eclipse.swt.events.SelectionAdapter; -import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Menu; @@ -57,6 +54,8 @@ protected TraceBreakPoints traceBreakPoints; protected DebuggingController debuggingController = DebuggingController.getInstance(); public static final String ID = "org.ntlab.traceDebugger.breakPointView"; + public static final String DEBUG_ELCL = "Debug_elcl"; + public static final String DEBUG_DLCL = "Debug_dlcl"; public static final String IMPORT_BREAKPOINT_ELCL = "ImportBreakPoint_ELCL"; public static final String IMPORT_BREAKPOINT_DLCL = "ImportBreakPoint_DLCL"; public static final String STEP_NEXT_ELCL = "StepNext_ELCL"; @@ -196,9 +195,9 @@ }; debugAction.setText("Debug"); debugAction.setToolTipText("Debug"); - ImageDescriptor debugImage = DebugUITools.getImageDescriptor(IDebugUIConstants.IMG_ACT_DEBUG); - debugAction.setImageDescriptor(debugImage); - + ImageDescriptor debugIcon = registry.getDescriptor(DEBUG_DLCL); + debugAction.setImageDescriptor(debugIcon); + terminateAction = new Action() { @Override public void run() { @@ -316,8 +315,8 @@ public void reset() { viewer.setInput(new ArrayList()); viewer.refresh(); - updateImagesForBreakPoint(false); updateImagesForDebug(false); + updateImagesForBreakPoint(false); } public void updateTraceBreakPoints(TraceBreakPoints traceBreakPoints) { @@ -336,11 +335,15 @@ } public void updateImagesForBreakPoint(boolean hasLoadedTraceFile) { - ImageRegistry registry = TraceDebuggerPlugin.getDefault().getImageRegistry(); + ImageRegistry registry = TraceDebuggerPlugin.getDefault().getImageRegistry(); if (hasLoadedTraceFile) { + ImageDescriptor debugIcon = registry.getDescriptor(DEBUG_ELCL); + debugAction.setImageDescriptor(debugIcon); ImageDescriptor importBreakpointIcon = registry.getDescriptor(IMPORT_BREAKPOINT_ELCL); importBreakpointAction.setImageDescriptor(importBreakpointIcon); } else { + ImageDescriptor debugIcon = registry.getDescriptor(DEBUG_DLCL); + debugAction.setImageDescriptor(debugIcon); ImageDescriptor importBreakpointIcon = registry.getDescriptor(IMPORT_BREAKPOINT_DLCL); importBreakpointAction.setImageDescriptor(importBreakpointIcon); } @@ -349,6 +352,8 @@ public void updateImagesForDebug(boolean isRunning) { ImageRegistry registry = TraceDebuggerPlugin.getDefault().getImageRegistry(); if (isRunning) { + ImageDescriptor debugIcon = registry.getDescriptor(DEBUG_DLCL); + debugAction.setImageDescriptor(debugIcon); ImageDescriptor terminateImage = DebugUITools.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_TERMINATE); terminateAction.setImageDescriptor(terminateImage); ImageDescriptor stepIntoImage = DebugUITools.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_STEP_INTO); @@ -362,6 +367,8 @@ ImageDescriptor image = DebugUITools.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_RESUME); resumeAction.setImageDescriptor(image); } else { + ImageDescriptor debugIcon = registry.getDescriptor(DEBUG_ELCL); + debugAction.setImageDescriptor(debugIcon); ImageDescriptor terminateImage = DebugUITools.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_TERMINATE); terminateAction.setImageDescriptor(terminateImage); ImageDescriptor stepIntoImage = DebugUITools.getImageDescriptor(IInternalDebugUIConstants.IMG_DLCL_STEP_INTO); diff --git a/src/org/ntlab/traceDebugger/DebuggingController.java b/src/org/ntlab/traceDebugger/DebuggingController.java index 84a6e24..0f5044a 100644 --- a/src/org/ntlab/traceDebugger/DebuggingController.java +++ b/src/org/ntlab/traceDebugger/DebuggingController.java @@ -185,6 +185,7 @@ return false; } if (isRunning) { + MessageDialog.openInformation(null, "Error", "This Debugger is running"); return false; } TraceBreakPoints traceBreakPoints = ((BreakPointView)TraceDebuggerPlugin.getActiveView(BreakPointView.ID)).getTraceBreakPoints(); diff --git a/src/org/ntlab/traceDebugger/TraceDebuggerPlugin.java b/src/org/ntlab/traceDebugger/TraceDebuggerPlugin.java index 3edc458..8e05623 100644 --- a/src/org/ntlab/traceDebugger/TraceDebuggerPlugin.java +++ b/src/org/ntlab/traceDebugger/TraceDebuggerPlugin.java @@ -113,7 +113,9 @@ @Override protected void initializeImageRegistry(ImageRegistry reg) { - // �u���[�N�|�C���g�r���[�Ɋւ���A�C�R�� + // note: �u���[�N�|�C���g�r���[�Ɋւ���A�C�R�� + reg.put(BreakPointView.DEBUG_ELCL, getImageDescriptor("/icons/debug/debug_elcl.png")); + reg.put(BreakPointView.DEBUG_DLCL, getImageDescriptor("/icons/debug/debug_dlcl.png")); reg.put(BreakPointView.IMPORT_BREAKPOINT_ELCL, getImageDescriptor("/icons/debug/import_brkpts_elcl.png")); reg.put(BreakPointView.IMPORT_BREAKPOINT_DLCL, getImageDescriptor("/icons/debug/import_brkpts_dlcl.png")); reg.put(BreakPointViewRelatedDelta.STEP_NEXT_ELCL, getImageDescriptor("/icons/debug/stepnext_elcl.png")); @@ -127,7 +129,7 @@ reg.put(BreakPointViewRelatedDelta.BACK_RESUME_ELCL, getImageDescriptor("/icons/debug/backresume_elcl.png")); reg.put(BreakPointViewRelatedDelta.BACK_RESUME_DLCL, getImageDescriptor("/icons/debug/backresume_dlcl.png")); - // �ϐ��r���[�Ɋւ���A�C�R�� + // note: �ϐ��r���[�Ɋւ���A�C�R�� reg.put(VariableLabelProvider.SPECIAL_VARIABLE, getImageDescriptor("/icons/variable/specialvariable.png")); reg.put(VariableLabelProvider.THIS_VARIABLE, getImageDescriptor("/icons/variable/thisvariable.png")); reg.put(VariableLabelProvider.FIELD_VARIABLE, getImageDescriptor("/icons/variable/fieldvariable.png"));