Completion broken with TypedActionHandler
I've implemented an editor plugin that extends KeyAdapter and implements TypedActionHandler. I can't get the completion features to work with just '.' -- it seems like it's being consumed and never passed to the IDEA code that should detect the period.
I'm using document.insertString (offset, char) to insert characters as I receive them in the execute method.
Is this a bug or am I missing something?
Thanks,
Dewayne
Please sign in to leave a comment.
The expected way all owerriding handlers should work is the following:
Analyze weather the situation is "your own handler specific" and do "your
own stuff" if it is and call original handler if it is not. Original handler
can be queried from EditorActionManager before you install your own.
// Installing own handler
EditorActionManager actionManager = EditorActionManager.getInstance();
TypedAction typedAction = actionManager.getTypedAction();
typedAction.setupHandler(new TypedHandler(typedAction.getHandler()));
// Own handler class
public class TypedHandler implements TypedActionHandler {
private TypedActionHandler myOriginalHandler;
public TypedHandler(TypedActionHandler originalHandler){
myOriginalHandler = originalHandler;
}
public void execute(Editor editor, char charTyped, DataContext
dataContext) {
if (!) { myOriginalHandler.execute(editor, charTyped, dataContext); return; } } } -- Best regards, Maxim Shafirov JetBrains, Inc / IntelliJ Software http://www.intellij.com "Develop with pleasure!" "Dewayne McNair" ]]> wrote in message
news:4859349.1035908685430.JavaMail.jrun@is.intellij.net...
implements TypedActionHandler. I can't get the completion features
to work with just '.' -- it seems like it's being consumed and never passed
to the IDEA code that should detect the period.
>
as I receive them in the execute method.
>
>
>