diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/ConstructedDisassemblyMessages.properties b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/ConstructedDisassemblyMessages.properties new file mode 100644 index 00000000000..be0d6f32b96 --- /dev/null +++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/ConstructedDisassemblyMessages.properties @@ -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 diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyMessages.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyMessages.java index 117484c802b..18163c001cf 100644 --- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyMessages.java +++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyMessages.java @@ -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() { diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java index 00dc58925ae..9074b0ccecb 100644 --- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java +++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java @@ -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));