void (@NotNull Editor editor, char charTyped, @NotNull DataContext dataContext) { PerEditorSearchData data = editor.getUserData(SEARCH_DATA_IN_EDITOR_VIEW_KEY); if (data == null || data.hint == null){ if (myOriginalHandler != null) myOriginalHandler.execute(editor, charTyped, dataContext); } else{ LightweightHint hint = data.hint; PerHintSearchData hintData = hint.getUserData(SEARCH_DATA_IN_HINT_KEY); String text = hintData.label.getText(); text += charTyped; hintData.label.setText(text); MyPanel comp = (MyPanel)hint.getComponent(); if (comp.getTruePreferredSize().width > comp.getSize().width){ Rectangle bounds = hint.getBounds(); hint.pack(); hint.updateLocation(bounds.x, bounds.y); } updatePosition(editor, hintData, false, false); } }