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)
| 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 | /** |
nothing calls this directly
no test coverage detected