mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 113107: Make trace logs more readily available. Implementation of the "Verbose Mode" action.
This commit is contained in:
parent
cb185efddb
commit
4538ba6fd1
6 changed files with 83 additions and 1 deletions
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 367 B |
|
@ -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
|
|
@ -53,5 +53,24 @@
|
|||
<adapter type="org.eclipse.ui.IActionFilter"/>
|
||||
</factory>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.ui.popupMenus">
|
||||
<objectContribution
|
||||
adaptable="false"
|
||||
id="org.eclipse.cdt.debug.mi.ui.gdbProcessActions"
|
||||
objectClass="org.eclipse.cdt.debug.mi.core.GDBProcess">
|
||||
<action
|
||||
class="org.eclipse.cdt.debug.mi.internal.ui.actions.VerboseModeActionDelegate"
|
||||
enablesFor="1"
|
||||
helpContextId="verbose_mode_console_action_context"
|
||||
icon="icons/obj16/verbose_mode_co.gif"
|
||||
id="org.eclipse.cdt.debug.mi.ui.verboseModeAction"
|
||||
label="%VerboseMode.label"
|
||||
menubarPath="renderGroup"
|
||||
state="false"
|
||||
style="toggle"
|
||||
tooltip="%VerboseMode.tooltip"/>
|
||||
</objectContribution>
|
||||
</extension>
|
||||
|
||||
</plugin>
|
||||
|
|
|
@ -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() );
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue