License Changer - plugin detail

Provides an action on folders to change the license headers on all files underneath. Choose from existing license headers or provide your own in the License Changer Wizard. It will change license headers on all files it understands (currently Java, JavaFX, XML, Groovy and Properties) under any directory.

NetBeans Plugin - License Changer
Plugin owner: nhoffmann
Website: http://www.netbeans.org
Added: 2009-04-25
License: GPL+Classpath Exception, CDDL
Category: Utilities
Downloaded: 3,907 times
Rating:
 4.56, by 10 users

Plugin Log Show log

Versions available

Download plugin   Download size: 0.04 MB   Last Update: 2014-03-28

What's new in this version

Version 1.9.2 is compatible with NetBeans 8.0 and fixes a number issues that were reported against the previous version.
  • Issue 239631: License Changer now correctly changes line endings no matter how intermixed they are.
  • Issue 239582: License Changer now supports all template variables, except project.license.
  • Issue 241693: License Changer now respects JavaDoc comments before the package declaration.

In order to change the licenses, right click desired package and invoke Tools > Change License Header from the popup menu. The action works recursively. Affected files can be selected or deselected individually. Changes can be previewed with an integrated diff view.

Right now the following file types are supported:

  • Java
  • JavaFX
  • Groovy
  • Properties
  • XML


Verifications for NetBeans versions

Plugin is not subject to any verification

Download plugin   Download size: 0.04 MB   Last Update: 2014-02-19

What's new in this version

Version 1.9.2 is compatible with NetBeans 7.4.1 and fixes a number issues that were reported against the previous version.
  • Issue 239631: License Changer now correctly changes line endings no matter how intermixed they are.
  • Issue 239582: License Changer now supports all template variables, except project.license.
  • Issue 241693: License Changer now respects JavaDoc comments before the package declaration.

In order to change the licenses, right click desired package and invoke Tools > Change License Header from the popup menu. The action works recursively. Affected files can be selected or deselected individually. Changes can be previewed with an integrated diff view.

Right now the following file types are supported:

  • Java
  • JavaFX
  • Groovy
  • Properties
  • XML



Verifications for NetBeans versions

Plugin is not subject to any verification

Download plugin   Download size: 0.04 MB   Last Update: 2013-08-08

This plugin is also available on the NetBeans Plugin Portal Update Center. Use 'Tools > Plugins' action from the NetBeans IDE main menu for convenient installation of this plugin


What's new in this version

The version 1.9 works with NetBeans 7.3. In order to change the licenses, right click desired package and invoke Tools > Change License Header from popup menu. The action works recursively. Right now the following file types are supported:
  • Java
  • JavaFX
  • Groovy
  • Properties
  • XML


Verifications for NetBeans versions

7.3 verification PASSED See verification details
Download plugin   Download size: 0.20 MB   Last Update: 2011-12-21

What's new in this version



Verifications for NetBeans versions

Plugin is not subject to any verification

Download plugin   Download size: 0.20 MB   Last Update: 2011-12-21

What's new in this version



Verifications for NetBeans versions

Plugin is not subject to any verification

Download plugin   Download size: 0.20 MB   Last Update: 2011-12-21

What's new in this version



Verifications for NetBeans versions

Plugin is not subject to any verification

Download plugin   Download size: 0.20 MB   Last Update: 2011-12-21

What's new in this version



Verifications for NetBeans versions

Plugin is not subject to any verification

Download plugin   Download size: 0.20 MB   Last Update: 2011-12-21

What's new in this version



Verifications for NetBeans versions

Plugin is not subject to any verification



Introduction

Provides an action on folders to change the license headers on all files underneath. Choose from existing license headers or provide your own in the License Changer Wizard. It will change license headers on all files it understands (currently Java, JavaFX, XML, Groovy and Properties) under any directory. The plugin is aware of licenses that have been installed or are available under Templates/Licenses and supports freemarker template expansion. It can also update Ant and Maven Projects to honor the selected license header when creating new files within the same project. Note that this module makes wholesale changes to many files. It allows to exclude directories and individual files. If in doubt, make a backup before using it. It contains an API for adding operators to modify other file types - contributions are welcome. It lives at NetBeans Contrib Repository.

[ You have to be logged in to be able to comment. ]

User Comments

  

RE: Reuse saved settings

Thanks for the review and for featuring License Changer on your blog.
Your request for enhancement is now tracked by issue #243339.

Posted by nhoffmann on Mar 28, 2014
  

Reuse saved settings

Thanks a lot for this great plugin.

I have one comment/request.

On the second page of the wizard there is the possibility to "Set as default project license" which is very good.

Unfortunately the plugin, on the second invocation does not reuse the saved settings but ask again for the license. It should be nice to have the previously selected license shown as the current one.

Posted by gualtiero65 on Feb 25, 2014
  

Plugin fixed for NetBeans IDE 7.3

This is to inform everyone that working version 1.9 of License Changer plugin was published. Please give it a try!
Posted by jkovalsky on Aug 08, 2013
  

Crashes on NB 7.2

First a side-note. This plugin does not seem to know about the license files you've added yourself even if these work perfectly fine in the IDE's Template menu. You can however browse for a license file instead so I guess that will be a workaround. But it is sad.

On the Wizard's preview step I get this:



java.lang.NullPointerException
at java.util.HashSet.(HashSet.java:116)
at org.netbeans.modules.licensechanger.FileChildren.(FileChildren.java:74)
at org.netbeans.modules.licensechanger.PreviewPanel.(PreviewPanel.java:84)
at org.netbeans.modules.licensechanger.WizardPP.createPanel(WizardPP.java:193)
at org.netbeans.spi.wizard.SimpleWizardInfo.createPanel(SimpleWizardInfo.java:112)
at org.netbeans.spi.wizard.SimpleWizard.navigatingTo(SimpleWizard.java:109)
at org.netbeans.spi.wizard.Wizard.navigatingTo(Wizard.java:137)
at org.netbeans.api.wizard.displayer.WizardDisplayerImpl.navigateTo(WizardDisplayerImpl.java:499)
at org.netbeans.api.wizard.displayer.NavButtonManager.processNextProceed(NavButtonManager.java:373)
at org.netbeans.api.wizard.displayer.NavButtonManager.processNext(NavButtonManager.java:356)
at org.netbeans.api.wizard.displayer.NavButtonManager.actionPerformed(NavButtonManager.java:250)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6505)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6270)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:703)
at java.awt.EventQueue.access$000(EventQueue.java:102)
at java.awt.EventQueue$3.run(EventQueue.java:662)
at java.awt.EventQueue$3.run(EventQueue.java:660)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:676)
at java.awt.EventQueue$4.run(EventQueue.java:674)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:673)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:158)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:155)
at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:182)
at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:221)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:219)
at java.awt.Dialog.show(Dialog.java:1072)
at java.awt.Component.show(Component.java:1651)
at java.awt.Component.setVisible(Component.java:1603)
at java.awt.Window.setVisible(Window.java:1014)
at java.awt.Dialog.setVisible(Dialog.java:1003)
at org.netbeans.api.wizard.displayer.WizardDisplayerImpl.showInDialog(WizardDisplayerImpl.java:335)
at org.netbeans.api.wizard.displayer.WizardDisplayerImpl.show(WizardDisplayerImpl.java:248)
at org.netbeans.api.wizard.WizardDisplayer.showWizard(WizardDisplayer.java:107)
at org.netbeans.api.wizard.WizardDisplayer.showWizard(WizardDisplayer.java:135)
at org.netbeans.modules.licensechanger.ChangeLicenseAction.actionPerformed(ChangeLicenseAction.java:83)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
at java.awt.Component.processMouseEvent(Component.java:6505)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6270)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
at java.awt.Container.dispatchEventImpl(Container.java:2273)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:703)
at java.awt.EventQueue.access$000(EventQueue.java:102)
at java.awt.EventQueue$3.run(EventQueue.java:662)
at java.awt.EventQueue$3.run(EventQueue.java:660)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:676)
at java.awt.EventQueue$4.run(EventQueue.java:674)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:673)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:158)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:244)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:147)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:139)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:97)


So as it stand the plugin cannot be used.
Tested on v7.2.

Posted by phansson on Aug 22, 2012
  

NullPointerException as well running NB 7.1 RC2

java.lang.NullPointerException
at java.util.HashSet.(HashSet.java:99)
at org.netbeans.modules.licensechanger.FileChildren.(FileChildren.java:74)
at org.netbeans.modules.licensechanger.PreviewPanel.(PreviewPanel.java:84)
at org.netbeans.modules.licensechanger.WizardPP.createPanel(WizardPP.java:193)
Posted by ehasting on Dec 22, 2011
  

Where to click?

I can't find any button/menu to open this wizard. Using 7.1 snapshot.
Posted by fleka on Aug 25, 2011
  

NullPointerException in Preview Window on Netbeans 7.0

In the Preview window I get a NullPointerException on NetBeans IDE 7.0 (Build 201104080000)

java.lang.NullPointerException
at java.util.HashSet.(HashSet.java:99)
at org.netbeans.modules.licensechanger.FileChildren.(FileChildren.java:74)
at org.netbeans.modules.licensechanger.PreviewPanel.(PreviewPanel.java:84)
at org.netbeans.modules.licensechanger.WizardPP.createPanel(WizardPP.java:193)
Posted by desmond_kirrane on May 24, 2011
  

Choose file type

Looks nice, but why it just allow Java files?
What's the problem to select PHP files too?
Posted by admirau on Jan 27, 2010
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo