mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-13 19:25:38 +02:00
Removed the "Add Address Breakpoint" and "Add Watchpoint" global actions.
This commit is contained in:
parent
a259c14511
commit
54fc7513cb
4 changed files with 6 additions and 149 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2004-06-16 Mikhail Khodjaiants
|
||||||
|
Removed the "Add Address Breakpoint" and "Add Watchpoint" global actions.
|
||||||
|
* plugin.properties
|
||||||
|
* plugin.xml
|
||||||
|
* AddAddressBreakpointActionDelegate.java
|
||||||
|
|
||||||
2004-06-15 Mikhail Khodjaiants
|
2004-06-15 Mikhail Khodjaiants
|
||||||
Added the "Toggle Watchpoint" object contribution action.
|
Added the "Toggle Watchpoint" object contribution action.
|
||||||
* plugin.properties
|
* plugin.properties
|
||||||
|
|
|
@ -36,10 +36,8 @@ ManageFunctionBreakpointAction.tooltip=Toggle Function/Method Breakpoint
|
||||||
ToggleWatchpointAction.label=Toggle Watchpoint
|
ToggleWatchpointAction.label=Toggle Watchpoint
|
||||||
ToggleWatchpointAction.tooltip=Toggle Variable Watchpoint
|
ToggleWatchpointAction.tooltip=Toggle Variable Watchpoint
|
||||||
BreakpointPropertiesAction.label=P&roperties...
|
BreakpointPropertiesAction.label=P&roperties...
|
||||||
GlobalManageWatchpointAction.label=Add &Watchpoint (C/C++)...
|
|
||||||
AddExpressionAction.label=Add &Expression...
|
AddExpressionAction.label=Add &Expression...
|
||||||
GlobalAddExpressionAction.label=Add &Expression (C/C++)...
|
GlobalAddExpressionAction.label=Add &Expression (C/C++)...
|
||||||
AddAddressBreakpointAction.label=Add &Address Breakpoint...
|
|
||||||
RunToLineAction.label=Run To &Line
|
RunToLineAction.label=Run To &Line
|
||||||
JumpToLineAction.label=Resume At Li&ne
|
JumpToLineAction.label=Resume At Li&ne
|
||||||
GlobalRunToLineAction.label=Run To &Line (C/C++)
|
GlobalRunToLineAction.label=Run To &Line (C/C++)
|
||||||
|
|
|
@ -193,36 +193,6 @@
|
||||||
</pluginState>
|
</pluginState>
|
||||||
</enablement>
|
</enablement>
|
||||||
</action>
|
</action>
|
||||||
<action
|
|
||||||
label="%AddAddressBreakpointAction.label"
|
|
||||||
icon="icons/full/obj16/addrbrkp_obj.gif"
|
|
||||||
helpContextId="add_address_breakpoint_action_context"
|
|
||||||
class="org.eclipse.cdt.debug.internal.ui.actions.AddAddressBreakpointActionDelegate"
|
|
||||||
menubarPath="org.eclipse.ui.run/cBreakpointGroup"
|
|
||||||
enablesFor="1"
|
|
||||||
id="org.eclipse.cdt.debug.internal.ui.actions.AddAddressBreakpointActionDelegate">
|
|
||||||
<enablement>
|
|
||||||
<pluginState
|
|
||||||
value="activated"
|
|
||||||
id="org.eclipse.cdt.debug.ui">
|
|
||||||
</pluginState>
|
|
||||||
</enablement>
|
|
||||||
</action>
|
|
||||||
<action
|
|
||||||
label="%GlobalManageWatchpointAction.label"
|
|
||||||
icon="icons/full/obj16/readwrite_obj.gif"
|
|
||||||
helpContextId="manage_watchpoint_action_context"
|
|
||||||
class="org.eclipse.cdt.debug.internal.ui.actions.AddWatchpointActionDelegate"
|
|
||||||
menubarPath="org.eclipse.ui.run/cBreakpointGroup"
|
|
||||||
disabledIcon="icons/full/obj16/readwrite_obj_disabled.gif"
|
|
||||||
id="org.eclipse.cdt.debug.internal.ui.actions.ManageWatchpointActionDelegate">
|
|
||||||
<enablement>
|
|
||||||
<pluginState
|
|
||||||
value="activated"
|
|
||||||
id="org.eclipse.cdt.debug.ui">
|
|
||||||
</pluginState>
|
|
||||||
</enablement>
|
|
||||||
</action>
|
|
||||||
<action
|
<action
|
||||||
id="org.eclipse.cdt.debug.internal.ui.actions.SignalZeroWorkbenchActionDelegate"
|
id="org.eclipse.cdt.debug.internal.ui.actions.SignalZeroWorkbenchActionDelegate"
|
||||||
hoverIcon="icons/full/clcl16/signal0_co.gif"
|
hoverIcon="icons/full/clcl16/signal0_co.gif"
|
||||||
|
|
|
@ -1,117 +0,0 @@
|
||||||
/*
|
|
||||||
*(c) Copyright QNX Software Systems Ltd. 2002.
|
|
||||||
* All Rights Reserved.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
package org.eclipse.cdt.debug.internal.ui.actions;
|
|
||||||
|
|
||||||
import org.eclipse.cdt.debug.core.model.IExecFileInfo;
|
|
||||||
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
|
|
||||||
import org.eclipse.debug.core.DebugException;
|
|
||||||
import org.eclipse.debug.core.model.IDebugElement;
|
|
||||||
import org.eclipse.debug.core.model.IDebugTarget;
|
|
||||||
import org.eclipse.jface.dialogs.IInputValidator;
|
|
||||||
import org.eclipse.jface.dialogs.InputDialog;
|
|
||||||
import org.eclipse.jface.window.Window;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* Enter type comment.
|
|
||||||
*
|
|
||||||
* @since Jan 13, 2003
|
|
||||||
*/
|
|
||||||
public class AddAddressBreakpointActionDelegate extends AbstractListenerActionDelegate
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* Enter type comment.
|
|
||||||
*
|
|
||||||
* @since Jan 13, 2003
|
|
||||||
*/
|
|
||||||
public class AddressValidator implements IInputValidator
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Constructor for AddressValidator.
|
|
||||||
*/
|
|
||||||
public AddressValidator()
|
|
||||||
{
|
|
||||||
super();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see org.eclipse.jface.dialogs.IInputValidator#isValid(String)
|
|
||||||
*/
|
|
||||||
public String isValid( String newText )
|
|
||||||
{
|
|
||||||
if ( newText.trim().length() == 0 )
|
|
||||||
return ""; //$NON-NLS-1$
|
|
||||||
long value = 0;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
value = parseValue( newText.trim() );
|
|
||||||
}
|
|
||||||
catch( NumberFormatException e )
|
|
||||||
{
|
|
||||||
return CDebugUIPlugin.getResourceString("internal.ui.actions.AddAddressBreakpointActionDelegate.Invalid_address"); //$NON-NLS-1$
|
|
||||||
}
|
|
||||||
return ( value > 0 ) ? null : CDebugUIPlugin.getResourceString("internal.ui.actions.AddAddressBreakpointActionDelegate.Address_can_not_be_0"); //$NON-NLS-1$
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see org.eclipse.cdt.debug.internal.ui.actions.AbstractDebugActionDelegate#doAction(Object)
|
|
||||||
*/
|
|
||||||
protected void doAction( Object element ) throws DebugException
|
|
||||||
{
|
|
||||||
InputDialog dialog = new InputDialog( getWindow().getShell(),
|
|
||||||
CDebugUIPlugin.getResourceString("internal.ui.actions.AddAddressBreakpointActionDelegate.Add_Address_Breakpoint"), //$NON-NLS-1$
|
|
||||||
CDebugUIPlugin.getResourceString("internal.ui.actions.AddAddressBreakpointActionDelegate.Enter_address"), //$NON-NLS-1$
|
|
||||||
null,
|
|
||||||
new AddressValidator() );
|
|
||||||
if ( dialog.open() == Window.OK )
|
|
||||||
{
|
|
||||||
// CDebugModel.createAddressBreakpoint( ((IExecFileInfo)getDebugTarget( element ).getAdapter( IExecFileInfo.class )).getExecFile(),
|
|
||||||
// parseValue( dialog.getValue().trim() ),
|
|
||||||
// true,
|
|
||||||
// 0,
|
|
||||||
// "", //$NON-NLS-1$
|
|
||||||
// true );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @see org.eclipse.cdt.debug.internal.ui.actions.AbstractDebugActionDelegate#isEnabledFor(Object)
|
|
||||||
*/
|
|
||||||
protected boolean isEnabledFor( Object element )
|
|
||||||
{
|
|
||||||
if ( element != null && element instanceof IDebugElement )
|
|
||||||
{
|
|
||||||
IDebugTarget target = getDebugTarget( element );
|
|
||||||
return ( target != null && !target.isTerminated() && target.getAdapter( IExecFileInfo.class ) != null );
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected long parseValue( String text ) throws NumberFormatException
|
|
||||||
{
|
|
||||||
long value = 0;
|
|
||||||
if ( text.trim().startsWith( "0x" ) ) //$NON-NLS-1$
|
|
||||||
{
|
|
||||||
value = Integer.parseInt( text.substring( 2 ), 16 );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
value = Integer.parseInt( text );
|
|
||||||
}
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
private IDebugTarget getDebugTarget( Object element )
|
|
||||||
{
|
|
||||||
if ( element != null && element instanceof IDebugElement )
|
|
||||||
{
|
|
||||||
return ((IDebugElement)element).getDebugTarget();
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Add table
Reference in a new issue