/** * Constructs an action that opens the launch configuration dialog in the context of the specified * launch group. * * @param identifier unique identifier of a launch group extension */ public OpenLaunchDialogAction(String identifier) { fIdentifier = identifier; ILaunchGroup group = DebugUIPlugin.getDefault().getLaunchConfigurationManager().getLaunchGroup(fIdentifier); if (group != null) { String lbl = group.getLabel(); String actionLabel = MessageFormat.format(ActionMessages.OpenLaunchDialogAction_1, new String[] {lbl}); setText(DebugUIPlugin.adjustDBCSAccelerator(actionLabel)); } PlatformUI.getWorkbench() .getHelpSystem() .setHelp(this, IDebugHelpContextIds.OPEN_LAUNCH_CONFIGURATION_ACTION); }
/** tests a string that should not change (no DBCS style accelerator). */ public void testWithoutDBCSAcclerator() { assertEquals( "incorrect DBCS accelerator substitution", //$NON-NLS-1$ "Open &Run Dialog...", //$NON-NLS-1$ DebugUIPlugin.adjustDBCSAccelerator("Open &Run Dialog...")); // $NON-NLS-1$ }
/** tests a string without "..." */ public void testWithoutEllipses() { assertEquals( "incorrect DBCS accelerator substitution", //$NON-NLS-1$ "Open Run Dialog(&R)", //$NON-NLS-1$ DebugUIPlugin.adjustDBCSAccelerator("Open Run(&R) Dialog")); // $NON-NLS-1$ }