label = macro.name; int index = label.lastIndexOf('/'); label = label.substring(index + 1) .replace('_',' '); action = macro.action;
if(macro != null) { label = macro.name; int index = label.lastIndexOf('/'); label = label.substring(index + 1) .replace('_',' '); action = macro.action; } else { label = name.substring(11); action = null; }
	public static EnhancedButton loadToolButton(String name)	{		String label;		EditAction action;		// HACK		if(name.startsWith("play-macro@"))		{			Macros.Macro macro = Macros.getMacro(name.substring(11));			label = macro.name;			int index = label.lastIndexOf('/');			label = label.substring(index + 1)				.replace('_',' ');			action = macro.action;		}		else		{			action = jEdit.getAction(name);			label = jEdit.getProperty(name.concat(".label"));			if(label == null)				label = name;			else				label = prettifyMenuLabel(label);		}		Icon icon;		String iconName = jEdit.getProperty(name + ".icon");		if(iconName != null)		{			icon = loadIcon(iconName);			if(icon == null)				return null;		}		else			return null;		String toolTip = label;		String shortcut = jEdit.getProperty(name + ".shortcut");		if(shortcut != null)			toolTip = toolTip + " (" + shortcut + ")";		return new EnhancedButton(icon,toolTip,action);	}