1 9 package de.loskutov.bco.compare.actions; 10 11 import org.eclipse.jface.action.Action; 12 import org.eclipse.ui.plugin.AbstractUIPlugin; 13 14 import de.loskutov.bco.BytecodeOutlinePlugin; 15 16 22 public class ToggleASMifierModeAction extends Action { 23 private static final String TASM_ID = "tasm"; private boolean isASMifierMode; 25 26 29 public ToggleASMifierModeAction() { 30 super(); 31 setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin( 32 BytecodeOutlinePlugin.getDefault().getBundle().getSymbolicName(), 33 BytecodeOutlinePlugin.IMG_ASM)); 34 35 setText(BytecodeOutlinePlugin 36 .getResourceString("ToggleASMifierModeAction.toggleASMifierMode.label")); setToolTipText(BytecodeOutlinePlugin 38 .getResourceString("ToggleASMifierModeAction.toggleASMifierMode.tooltip")); } 40 41 44 public String getId() { 45 return TASM_ID; 46 } 47 48 51 public void run() { 52 isASMifierMode = !isASMifierMode; 53 setChecked(isASMifierMode); 54 } 55 } | Popular Tags |