This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
To provide a coherent support grails plugins we need to provide: 1.) Some visualization for the "grails list-plugins" command. Possibly let the user pick one and take him to step #2 2.) Let the user install using "grails install-plugin". 3.) Display additional commands in apropriate context.
Created attachment 62881 [details] this patch allows to create plugins from the grails project context menu, I'm working on other capabilities.
There is an error into the patch, please, could you delete it?, I'll provide a new one when I'll fix it
It's not possible to remove attachment, just create new one. And thanks!
Created attachment 63747 [details] adds a window dialog that shows the plugins installed in an app and the available ones into the grails server. It allows to install and uninstall plugins.
Thanks for the patch! However I have few comments for you. PH01: Plugin should be immutable class (make fields final). PH02: Plugin brokes equals-hashcode contract. Please override hashCode too. PH03: If there is no particular reason for custom process handling you should use grails ExecutionSupport with help from extexecution API. Sample usage is GrailsActionProvider.executeSimpleAction(). Note you can easily assign LineProcessor to get parsed output from this api. PH04: PLUGINS_COMPARATOR does not ignore case (as Plugin.equals() do). Perhaps Plugin should implement Comparable and implementation of Comparable should be consistent with equals(). PH05: I do not understand all that runners in GrailsPluginPanel. These are all executed in the same thread - is there any need for runnable. PH06: There is strange synchronization in GrailsPluginPanel (related to that runners). Inside of the Runnable you synchronize on "this" - maybe what you meant is "GrailsPluginPanel.this".
Adding patch author on cc. David can you comment?
Hi David, first and foremost - thanks a lot for your patch! Don't get frustrated about us criticizing it ;-) Alas, I had no chance to get any plugin added to my projects. And this leads me to my proposal to have more feedback (progress-bars, grails-server output) about what's going on under the hood. I managed to get the list of available plugings, choosed one, and after a while it took me to the installed-tab, but nothing happened. In another test i did, i couldn't get the list of available plugins at all and had to close the dialog with the close gadget after a couple of minutes. There must be a cancel button beside OK/HELP. To sum it up: I would love to get this feature in - and we jointly will get there - , but we need more information for the user and the Grails server output in the IDE just like the other tasks.
I've just tuned the patch a bit so I'm attaching it. It is not complete and there are still some issues (wrong items in list, sometimes not all plugins are listed). Perhaps the UI could be different - some progressbar would be nice. I'm just sharing what I've done. I have to go sleep now ;)
Created attachment 63850 [details] updated patch
Improved patch - fixed wrongly parsed plugins (causing NPEs in UI).
Created attachment 63913 [details] yet another improvement
Created attachment 64093 [details] Thanks for the feedback and the improvements. I've fixed the tabs symcronization errors and I've added a progress bar dialog that's shown when a plugin is been installed
Created attachment 64182 [details] I've added a file chooser in order to allow installing plugins from zip files
Thanks for working on this. I have some additional comments. PH07: getPluginFromZipFile contains resource leak (zip entry). Very dangerous especially on windows. PH08: Return value of install-plugin process should be checked and some cleanup/ui notification should be made when != 0 PH09: Interruption exception shouldn't be ignored - somebody is requesting interruption. PH10: Better handling of ExecutionException is Exceptions.printStackTrace(ex.getCause()); PH11: On cancellation exception similar cleanup as for PH08 should be made. I'll try to implement at least 07, 09 and 11. Thanks again for contribution.
Martin do you think this should be part of 6.5?
Ok I've fixed all my comments (07-11) + some minor tweaks ;) I rewrite the GrailsPluginManager.installPlugin() bit to achieve the goal. What should be done yet: PH12: change the type of parameters in GrailsPluginManager to GrailsPlugin instead of Object PH13: split installPlugin to make it more readable PH14: use final fields wherever possible Please review the patch for regressions. Thanks.
Created attachment 64211 [details] patch iteration
Created attachment 64239 [details] I've fixed PH12, PH13 and PH14
Pushed to main 5a7143662336.
Created attachment 64409 [details] Screenshot of garbled dialog on Mac OS X
I verified the patch on my two Mac's (Intel + PPC). It works in principle and i like it, but there are two things i like to bring up: a) On Mac the JButton named "Install" is only partly visible. See screenshot. b) The (initial) updating the list of available plugins takes ages even behind fast internet connections. The Console output is a major improvement here, but there is no progress-indicator whatsoever. Would it be feasible to hook into the corresponding grails command to get a progess-bar for this operation?
a) UI definitely needs to be polished b) I think only indeterminate progress bar is possible here. I'll look at this.
Integrated into 'main-golden', available in NB_Trunk_Production #324 build Changeset: http://hg.netbeans.org/main/rev/5a7143662336 User: phejl@netbeans.org Log: #132393 Support for Grails plugins
Polished ui pushed to main f07343dad813.