protected void handleMouseDown(final MouseDownEvent event) {
        if (MouseUtil.isSecondary(event)) {
            final PopupPosition popupPosition = new PopupPosition(event.getClientX(), event.getClientY());
            ContextMenuEvent.fire(this, popupPosition);
        } else {
            EditorViewImpl.indicatorPopup.hide();
            MouseDownEvent.fireNativeEvent(event.getNativeEvent(), this);
        }
    }
This is a widget that can be used to edit text. It provides useful
functionality such as formatting, styling, line numbers and warning/error
markers.
stroom-core-client-widget/src/main/java/stroom/editor/client/view/EditorViewImpl.java