MCPcopy Create free account
hub / github.com/bobbylight/RText / handleInstallPlugin

Method handleInstallPlugin

src/main/java/org/fife/rtext/RText.java:771–783  ·  view source on GitHub ↗

Does the dirty work of actually installing a plugin. This method ensures the current text area retains focus even after a GUI plugin is added. @param plugin The plugin to install.

(Plugin plugin)

Source from the content-addressed store, hash-verified

769 * @param plugin The plugin to install.
770 */
771 @Override
772 protected void handleInstallPlugin(Plugin plugin) {
773 // Normally we don't have to check currentTextArea for null, but in
774 // this case, we do. Plugins are installed at startup, after the main
775 // window is displayed. If the user passes in a filename to open, but
776 // that file doesn't exist, RText will prompt with "File XXX does not
777 // exist, create it?", and in that time, currentTextArea will be null.
778 // Plugins, in the meantime, will try to load and find the null value.
779 RTextEditorPane textArea = getMainView().getCurrentTextArea();
780 if (textArea!=null) {
781 textArea.requestFocusInWindow();
782 }
783 }
784
785
786 /**

Callers

nothing calls this directly

Calls 3

getMainViewMethod · 0.95
getCurrentTextAreaMethod · 0.80
requestFocusInWindowMethod · 0.80

Tested by

no test coverage detected