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.
Hi I have come across this issue when I submitted a new plugin for review. This plugin is adds a new LAF. Since it switches the LAF from Synth to Metal, there is no easy way to do it properly without application restart. Steps to reproduce: http://plugins.netbeans.org/plugin/40985/ez-on-da-ice Install ez-on-da-ice plugin Restart at the prompt. Deactivate the plugin from Tools | plugins | installed. Restart at the prompt. Activate the plugin again from Tools | Plugins | Installed. There is no prompt for restart. This the LAF is partially rendered. Plugin's uses Maven for building and declares requireRestart to true in the module descriptor. After looking through the documentation, I found that there is currently no easy way to enforce this. So, putting forth this request to add the ability to request restart on plugin activation. Thanks Sincerely Venkat Akkineni
*** Bug 206517 has been marked as a duplicate of this bug. ***
Consider using http://bits.netbeans.org/dev/javadoc/org-openide-awt/org/openide/awt/NotificationDisplayer.html to show a notification and http://bits.netbeans.org/dev/javadoc/org-openide-util/org/openide/LifecycleManager.html#markForRestart() to restart.
When would I call mark for restart. How to recognize when the plugin has been activated ? I have tried using restored method in the Installer, but this method is called everytime the plugin is loaded on netbeans startup. Putting markForRestart in the restored method will make netbeans to go into an infinite restart loop.
What about trying to use NbPreferences to record whether your module has been closed or uninstalled? Started for the second time, etc.?
But this enhancement depended on was resolved. This may mean the enhancement is not needed anymore.
Jaroslav I found the solution was a workaround and not a straight forward way to mark for restart on plugin reactivation. I learned that this is by design as Netbeans team is trying to reduce the number of restarts. But, for LNF related plugins, restarting seems to be the only way. Another reason I closed the bug is because while they rejected my 7.1 version, they somehow accepted the 7.2 version. Possibly because saubrecht has a LNF plugin released for 7.2 and 7.3 and that plugin has a similar problem and his plugin passed verification. I opened this bug when Netbeans verification team rejected my verification 7.1 version. Now that the plugin passed verification, I don't have a use for this feature. Your suggestions ..