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.

Bug 206516 - Need a way to force restart on plugin reactivation
Summary: Need a way to force restart on plugin reactivation
Status: RESOLVED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: Module System (show other bugs)
Version: 7.1
Hardware: PC Linux
: P4 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
: 206517 (view as bug list)
Depends on: 206036
Blocks:
  Show dependency tree
 
Reported: 2011-12-19 05:23 UTC by venkatramakkineni
Modified: 2013-01-29 03:44 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description venkatramakkineni 2011-12-19 05:23:36 UTC
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
Comment 1 venkatramakkineni 2011-12-19 05:26:53 UTC
*** Bug 206517 has been marked as a duplicate of this bug. ***
Comment 3 venkatramakkineni 2012-08-09 15:29:18 UTC
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.
Comment 4 venkatramakkineni 2012-08-09 15:30:24 UTC
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.
Comment 5 Jaroslav Tulach 2013-01-10 07:56:05 UTC
What about trying to use NbPreferences to record whether your module has been closed or uninstalled? Started for the second time, etc.?
Comment 6 Jaroslav Tulach 2013-01-21 13:14:35 UTC
But this enhancement depended on was resolved. This may mean the enhancement is not needed anymore.
Comment 7 venkatramakkineni 2013-01-29 03:44:22 UTC
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 ..