Commit fb6df06d authored by andrei's avatar andrei

Dummy implementation of ui for show/hide local variables and line info in view...

Dummy implementation of ui for show/hide local variables and line info in view and compare. Need to be wired with underlined asm code.
parent 615f4870
......@@ -25,8 +25,6 @@ public class BytecodeOutlinePlugin extends AbstractUIPlugin {
private static BytecodeOutlinePlugin plugin;
//Resource bundle.
private ResourceBundle resourceBundle;
/** asm logo */
public static final String IMG_ASM = "icons/asm.gif"; //$NON-NLS-1$
* The constructor.
BytecodeOutlineView.linkWithEditor.label=Link with editor
BytecodeOutlineView.linkWithEditorText.tooltip=Link With Editor
BytecodeOutlineView.showOnlySelection.label=Show current element only
BytecodeOutlineView.showOnlySelection.tooltip=Show bytecode for current field/method only
BytecodeOutlineView.enableRawMode.label=Show "raw" bytecode
BytecodeOutlineView.enableRawMode.tooltip=Show bytecode without any additional help
BytecodeOutlineView.enableVerifier.label=Show bytecode analyzer pane
BytecodeOutlineView.enableVerifier.tooltip=Shows the symbolic state of the execution stack frame at selected bytecode instruction
BytecodeOutline.Title=Bytecode Outline
BytecodeOutline.Error=Error (Bytecode Outline)
ToggleASMifierModeAction.toggleASMifierMode.label=Toggle ASMifier mode on/off
ToggleASMifierModeAction.toggleASMifierMode.tooltip=Switch between true bytecode and ASMifier java code view
......@@ -54,3 +44,30 @@ BCOPreferencePage.showAsmifierCodeTip=Show ASMifier code
BCOPreferencePage.showOnlySelectedTip=Show bytecode for selected element only
BCOPreferencePage.linkViewToEditorTip=Link bytecode view to editor
action.hide_locals.text=Hide local variables
action.hide_locals.toolTipText=Hide local variables (if available in bytecode)
action.hide_line_info.text=Hide line info
action.hide_line_info.toolTipText=Hide line info (if available in bytecode)
action.toggle_asmifier_mode.text=Toggle ASMifier mode on/off
action.toggle_asmifier_mode.toolTipText=Switch between true bytecode and ASMifier java code view
action.show_verifier.text=Show bytecode analyzer pane
action.show_verifier.toolTipText=Shows the symbolic state of the execution stack frame at selected bytecode instruction
action.show_raw_mode.text=Show "raw" bytecode
action.show_raw_mode.toolTipText=Hide any additional help
action.show_selected_only.text=Show current element only
action.show_selected_only.toolTipText=Show bytecode for current field/method only
action.link_with_editor.text=Link with editor
action.link_with_editor.toolTipText=Link With Editor
\ No newline at end of file
* Copyright (c) 2004 Andrei Loskutov.
* Copyright (c) 2006 Andrei Loskutov.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the BSD License
* which accompanies this distribution, and is available at
* Contributor: Andrei Loskutov - initial API and implementation
package de.loskutov.bco.ui.actions;
import org.eclipse.jface.action.Action;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import de.loskutov.bco.BytecodeOutlinePlugin;
* Action used in compare view/bytecode view to toggle ASMifier formatter on/off.
* Default action which could be used as template for "toggle" action.
* Action image, text and tooltip will be initialized by default.
* To use it, register IPropertyChangeListener and check for IAction.CHECKED
* event name.
* @author Andrei
public class ToggleASMifierModeAction extends Action {
private static final String TASM_ID = "tasm"; //$NON-NLS-1$
private boolean isASMifierMode;
public class DefaultToggleAction extends Action {
/** Action id for toggle asmifier mode on/off */
public static final String TOGGLE_ASMIFIER = "toggle_asmifier_mode";
/** Action id for hide/show line info */
public static final String HIDE_LINE_INFO = "hide_line_info";
/** Action id for hide/show local variables */
public static final String HIDE_LOCALS = "hide_locals";
/** Action id for hide/show verifier */
public static final String SHOW_VERIFIER = "show_verifier";
/** Action id for hide/show raw bytecode */
public static final String SHOW_RAW_BYTECODE = "show_raw_mode";
/** Action id for show selected element only */
public static final String SHOW_SELECTED_ONLY = "show_selected_only";
/** Action id for link with editor mode on/off */
public static final String LINK_WITH_EDITOR = "link_with_editor";
* Init action with image/text/tooltip
* used to get text from props file
public ToggleASMifierModeAction() {
private static final String ACTION = "action";
private boolean checked;
public DefaultToggleAction(String id, boolean isChecked){
checked = isChecked;
// to init internal "value" attribute in Action class to proper start value
private void init(){
.getResourceString(ACTION + "." + getId() + "." + IMAGE)));
.getResourceString("ToggleASMifierModeAction.toggleASMifierMode.label")); //$NON-NLS-1$
.getResourceString(ACTION + "." + getId() + "." + TEXT));
.getResourceString("ToggleASMifierModeAction.toggleASMifierMode.tooltip")); //$NON-NLS-1$
* @see org.eclipse.jface.action.IAction#getId()
public String getId() {
return TASM_ID;
.getResourceString(ACTION + "." + getId() + "." + TOOL_TIP_TEXT));
* @see org.eclipse.jface.action.IAction#run()
public void run() {
isASMifierMode = !isASMifierMode;
checked = !checked;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment