Bug 31328 hover key modifier text field: selection is not replaced by new modifier
- given text: Ctrl - select text: Ctrl - press: Shift -> result: Ctrl + Shift expected: Shift (the same holds for the key modifier text field of 'hyperlink style navigation', please fix it too or reassign the bug to me once it is fixed for the hovers pref. page)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/JavaEditorHoverConfigurationBlock.java
int i= fHoverList.getSelectionIndex();
		String modifiers= fModifierEditor.getText();
		fHoverConfigs[i].fModifierString= modifiers;
		fHoverConfigs[i].fStateMask= JavaEditorTextHoverDescriptor.computeStateMask(modifiers);
		if (fHoverConfigs[i].fIsEnabled && fHoverConfigs[i].fStateMask == -1)
			fStatus= new StatusInfo(StatusInfo.ERROR, PreferencesMessages.getFormattedString("JavaEditorHoverConfigurationBlock.JavaEditorHoverConfigurationBlock.modifierIsNotValid", fHoverConfigs[i].fModifierString)); 
		else
			fStatus= new StatusInfo();
		updateStatus();
	}
	private void handleHoverListSelection() {	
		int i= fHoverList.getSelectionIndex();
		boolean enabled= fHoverConfigs[i].fIsEnabled;
		fEnableField.setSelection(enabled);
		fModifierEditor.setEnabled(enabled);
		fModifierEditor.setText(fHoverConfigs[i].fModifierString);
		String description= getContributedHovers()[i].getDescription();
		if (description == null)
			description= ""; 
		fDescription.setText(description);
	}
	private int convertHeightInCharsToPixels(Control control, int chars) {
		GC gc = new GC(control);
		gc.setFont(control.getFont());
		FontMetrics fontMetrics = gc.getFontMetrics();
		gc.dispose();
		if (fontMetrics == null)
			return 0;
		return Dialog.convertHeightInCharsToPixels(fontMetrics, chars);
	}