* @param suffix the key suffix
* @param allowNone the allow none color (in background color)
*/
private static void showPopup(final EditorContext editor, ToolbarClickButton button,
final String suffix, boolean allowNone) {
FocusedRange focusedRange = editor.getSelectionHelper().getSelectionRange();
if (focusedRange == null) {
// Lets try to focus
editor.focus(false);
}
focusedRange = editor.getSelectionHelper().getSelectionRange();
if (focusedRange == null) {
Window.alert(ComplexColorPicker.messages.selectSomeText());
return;
}
final Range range = focusedRange.asRange();
final ColorPopup popup = new ColorPopup(button.getButton().hackGetWidget().getElement(), allowNone);
popup.show(new OnColorChooseListener() {
@Override
public void onColorChoose(String color) {
EditorAnnotationUtil.