From 4538ba6fd1d3d715465ec280e1b3831c777ab1e2 Mon Sep 17 00:00:00 2001 From: Mikhail Khodjaiants Date: Thu, 13 Apr 2006 21:52:59 +0000 Subject: [PATCH] Bug 113107: Make trace logs more readily available. Implementation of the "Verbose Mode" action. --- debug/org.eclipse.cdt.debug.mi.ui/ChangeLog | 9 ++++ .../META-INF/MANIFEST.MF | 3 +- .../icons/obj16/verbose_mode_co.gif | Bin 0 -> 367 bytes .../plugin.properties | 3 ++ debug/org.eclipse.cdt.debug.mi.ui/plugin.xml | 19 +++++++ .../ui/actions/VerboseModeActionDelegate.java | 50 ++++++++++++++++++ 6 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 debug/org.eclipse.cdt.debug.mi.ui/icons/obj16/verbose_mode_co.gif create mode 100644 debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/actions/VerboseModeActionDelegate.java diff --git a/debug/org.eclipse.cdt.debug.mi.ui/ChangeLog b/debug/org.eclipse.cdt.debug.mi.ui/ChangeLog index e84e795f4a6..7a09e269a84 100644 --- a/debug/org.eclipse.cdt.debug.mi.ui/ChangeLog +++ b/debug/org.eclipse.cdt.debug.mi.ui/ChangeLog @@ -1,3 +1,12 @@ +2006-04-13 Mikhail Khodjaiants + Bug 113107: Make trace logs more readily available. + Implementation of the "Verbose Mode" action. + * MANIFEST.MF + * plugin.properties + * plugin.xml + + VerboseModeActionDelegate.java + + icons/obj16/verbose_mode_co.gif + 2006-04-11 Mikhail Khodjaiants Bug 119740: allow to specify only a subset of shared objects that we want symbols to be loaded for. Sort the shared library list. diff --git a/debug/org.eclipse.cdt.debug.mi.ui/META-INF/MANIFEST.MF b/debug/org.eclipse.cdt.debug.mi.ui/META-INF/MANIFEST.MF index a6a44e81a0e..2260512cf2f 100644 --- a/debug/org.eclipse.cdt.debug.mi.ui/META-INF/MANIFEST.MF +++ b/debug/org.eclipse.cdt.debug.mi.ui/META-INF/MANIFEST.MF @@ -21,5 +21,6 @@ Require-Bundle: org.eclipse.core.resources, org.eclipse.cdt.ui, org.eclipse.debug.core, org.eclipse.debug.ui, - org.eclipse.core.runtime + org.eclipse.core.runtime, + org.eclipse.ui.console Eclipse-LazyStart: true diff --git a/debug/org.eclipse.cdt.debug.mi.ui/icons/obj16/verbose_mode_co.gif b/debug/org.eclipse.cdt.debug.mi.ui/icons/obj16/verbose_mode_co.gif new file mode 100644 index 0000000000000000000000000000000000000000..ea13622821cca3cef0efeb1c6779c8dd83f6fc6a GIT binary patch literal 367 zcmZ?wbhEHb6krfwxXQpVVd2r4D^GSzUDvbp(xOf0R_wUYJ!AF6St|~oySrxhxsGCtZtN+7fQHYh8_wt;h zQEuvjPo0*Ze*G=Dqv>YCuj*U|2}N}U5t+`;_O5PqArU#r$&wSArmC}x2+PlvpEYM5 zyE+@wvgJ#cFJn_*yKeo4^?aK*Z06e_z|XvanV)-uAhRGB$5F0>f*aL2xp;YaxH#84 HGFSruOtOnN literal 0 HcmV?d00001 diff --git a/debug/org.eclipse.cdt.debug.mi.ui/plugin.properties b/debug/org.eclipse.cdt.debug.mi.ui/plugin.properties index 86bf3b9c7d2..841ce8e6601 100644 --- a/debug/org.eclipse.cdt.debug.mi.ui/plugin.properties +++ b/debug/org.eclipse.cdt.debug.mi.ui/plugin.properties @@ -17,3 +17,6 @@ SetAutoSolibAction.label=Automatically Load Shared Libraries SetAutoSolibAction.tooltip=Automatically Load Shared Libraries On/Off TargetOptionsPage.label=GDB/MI Options + +VerboseMode.label=Verbose Mode +VerboseMode.tooltip=Verbose Mode For gdb Console \ No newline at end of file diff --git a/debug/org.eclipse.cdt.debug.mi.ui/plugin.xml b/debug/org.eclipse.cdt.debug.mi.ui/plugin.xml index ba289e7b092..14857f8023b 100644 --- a/debug/org.eclipse.cdt.debug.mi.ui/plugin.xml +++ b/debug/org.eclipse.cdt.debug.mi.ui/plugin.xml @@ -53,5 +53,24 @@ + + + + + diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/actions/VerboseModeActionDelegate.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/actions/VerboseModeActionDelegate.java new file mode 100644 index 00000000000..43ec26a4971 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/actions/VerboseModeActionDelegate.java @@ -0,0 +1,50 @@ +/******************************************************************************* + * Copyright (c) 2004 QNX Software Systems and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * QNX Software Systems - Initial API and implementation + *******************************************************************************/ +package org.eclipse.cdt.debug.mi.internal.ui.actions; + +import org.eclipse.cdt.debug.mi.core.GDBProcess; +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.ui.IObjectActionDelegate; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.actions.ActionDelegate; + +public class VerboseModeActionDelegate extends ActionDelegate implements IObjectActionDelegate { + + private GDBProcess fProcess; + + /* (non-Javadoc) + * @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction, org.eclipse.ui.IWorkbenchPart) + */ + public void setActivePart( IAction action, IWorkbenchPart targetPart ) { + } + + /* (non-Javadoc) + * @see org.eclipse.ui.actions.ActionDelegate#run(org.eclipse.jface.action.IAction) + */ + public void run( IAction action ) { + if ( fProcess != null ) { + boolean enabled = fProcess.getTarget().isVerboseModeEnabled(); + fProcess.getTarget().enableVerboseMode( !enabled ); + } + } + + /* (non-Javadoc) + * @see org.eclipse.ui.actions.ActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection) + */ + public void selectionChanged( IAction action, ISelection selection ) { + IStructuredSelection s = (IStructuredSelection)selection; + fProcess = ( !s.isEmpty() ) ? (GDBProcess)s.getFirstElement() : null; + action.setEnabled( fProcess != null ); + action.setChecked( fProcess != null && fProcess.getTarget().isVerboseModeEnabled() ); + } +}