String activeLocale= bindingSvc.getLocale(); String activePlatform= bindingSvc.getPlatform(); final Binding[] bindings= bindingSvc.getBindings(); for (int i= 0; i < bindings.length; i++) { Binding binding= bindings[i]; String locale= binding.getLocale(); String platform= binding.getPlatform(); if (command.equals(binding.getParameterizedCommand()) && (locale == null || locale.equals(activeLocale)) && (platform == null || platform.equals(activePlatform))) { TriggerSequence triggers= binding.getTriggerSequence(); return triggers.format(); } }
TriggerSequence[] triggers= bindingSvc.getActiveBindingsFor(command); if (triggers.length > 0) return triggers[0].format();
		private String getKeyboardShortcut(ParameterizedCommand command) {			final IBindingService bindingSvc= (IBindingService) PlatformUI.getWorkbench().getAdapter(IBindingService.class);			String activeLocale= bindingSvc.getLocale();			String activePlatform= bindingSvc.getPlatform();			final Binding[] bindings= bindingSvc.getBindings();			for (int i= 0; i < bindings.length; i++) {				Binding binding= bindings[i];				String locale= binding.getLocale();				String platform= binding.getPlatform();				if (command.equals(binding.getParameterizedCommand()) 						&& (locale == null || locale.equals(activeLocale)) 						&& (platform == null || platform.equals(activePlatform)))				{					TriggerSequence triggers= binding.getTriggerSequence();					return triggers.format();				}			}			return null;		}