Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to redefine the trigger key? #59

Open
Unbrick opened this issue May 20, 2022 · 1 comment
Open

Is there a way to redefine the trigger key? #59

Unbrick opened this issue May 20, 2022 · 1 comment

Comments

@Unbrick
Copy link

Unbrick commented May 20, 2022

Hey there,

thank you for the awsome project. Sadly currently i'm facing the problem that the trigger key is already in use and therefore the autocompletion wont come up.

Is there any way to redefine the trigger key?

Thank you in advance!

@Hasnatrasool163
Copy link

yes you can do in abstract class or pass trigger key to installImp method , so all textareas could trigger autocompletion for user defined KeyStroke : this method would be update to pass a trigger key or use default

/**
* Registers an auto-completion instance. This should be called by
* subclasses in their
* {@link #install(org.fife.ui.rsyntaxtextarea.RSyntaxTextArea)} methods
* so that this language support can update all of them at once.
*
* @param textArea The text area that just installed the auto-completion.
// * @param ac The auto-completion instance.
* @see #uninstallImpl(RSyntaxTextArea)
*/
protected void installImpl(RSyntaxTextArea textArea,AutoCompletion ac) {
textAreaToAutoCompletion.put(textArea, ac);
ac.setTriggerKey(getKeyStroke());
}

its part of class
/**

  • A base class for language support implementations.
  • @author Robert Futrell
  • @Version 1.0
    */
    public abstract class AbstractLanguageSupport implements LanguageSupport {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants