mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-30 04:15:35 +02:00
[297601] [disassembly] Support 'Find' operation in disassembly view
This commit is contained in:
parent
29c8d99049
commit
b9a6ef638c
3 changed files with 39 additions and 4 deletions
|
@ -0,0 +1,15 @@
|
|||
##########################################################################
|
||||
# Copyright (c) 2010 Wind River 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:
|
||||
# Wind River Systems - initial API and implementation
|
||||
##########################################################################
|
||||
|
||||
FindReplaceAction.label=&Find/Replace...
|
||||
FindReplaceAction.tooltip=Find/Replace
|
||||
FindReplaceAction.image=
|
||||
FindReplaceAction.description=Find/Replace
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2007, 2009 Wind River Systems and others.
|
||||
* Copyright (c) 2007, 2010 Wind River 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
|
||||
|
@ -10,10 +10,24 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.dsf.debug.internal.ui.disassembly;
|
||||
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import org.eclipse.osgi.util.NLS;
|
||||
|
||||
public final class DisassemblyMessages extends NLS {
|
||||
|
||||
private static final String BUNDLE_FOR_CONSTRUCTED_KEYS = "org.eclipse.cdt.dsf.debug.internal.ui.disassembly.ConstructedDisassemblyMessages";//$NON-NLS-1$
|
||||
private static ResourceBundle fgBundleForConstructedKeys = ResourceBundle.getBundle(BUNDLE_FOR_CONSTRUCTED_KEYS);
|
||||
|
||||
/**
|
||||
* Returns the message bundle which contains constructed keys.
|
||||
*
|
||||
* @return the message bundle
|
||||
*/
|
||||
public static ResourceBundle getBundleForConstructedKeys() {
|
||||
return fgBundleForConstructedKeys;
|
||||
}
|
||||
|
||||
private static final String BUNDLE_NAME = "org.eclipse.cdt.dsf.debug.internal.ui.disassembly.DisassemblyMessages";//$NON-NLS-1$
|
||||
|
||||
private DisassemblyMessages() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2007, 2009 Wind River Systems and others.
|
||||
* Copyright (c) 2007, 2010 Wind River 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
|
||||
|
@ -181,6 +181,7 @@ import org.eclipse.ui.texteditor.AbstractDecoratedTextEditorPreferenceConstants;
|
|||
import org.eclipse.ui.texteditor.AnnotationPreference;
|
||||
import org.eclipse.ui.texteditor.ChainedPreferenceStore;
|
||||
import org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess;
|
||||
import org.eclipse.ui.texteditor.FindReplaceAction;
|
||||
import org.eclipse.ui.texteditor.ITextEditorActionConstants;
|
||||
import org.eclipse.ui.texteditor.IUpdate;
|
||||
import org.eclipse.ui.texteditor.MarkerAnnotationPreferences;
|
||||
|
@ -524,8 +525,8 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
|
|||
/*
|
||||
* @see IAdaptable#getAdapter(java.lang.Class)
|
||||
*/
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public Object getAdapter(Class required) {
|
||||
if (IVerticalRulerInfo.class.equals(required)) {
|
||||
if (fVerticalRuler != null) {
|
||||
|
@ -1301,6 +1302,11 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
|
|||
action.setActionDefinitionId(IWorkbenchCommandConstants.FILE_PRINT);
|
||||
fGlobalActions.put(ITextEditorActionConstants.PRINT, action);
|
||||
|
||||
action= new FindReplaceAction(DisassemblyMessages.getBundleForConstructedKeys(), "FindReplaceAction.", this); //$NON-NLS-1$
|
||||
action.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_FIND_AND_REPLACE);
|
||||
fGlobalActions.put(ActionFactory.FIND.getId(), action);
|
||||
fSelectionActions.add(action);
|
||||
|
||||
fActionGotoPC = new ActionGotoProgramCounter(this);
|
||||
fActionGotoPC.setActionDefinitionId(COMMAND_ID_GOTO_PC);
|
||||
fActionGotoPC.setImageDescriptor(DisassemblyImageRegistry.getImageDescriptor(DisassemblyImageRegistry.ICON_Home_enabled));
|
||||
|
|
Loading…
Add table
Reference in a new issue