Open pengYou opened 14 years ago
the same here
I get the same error on OSX 10.6 as well. I can select the phpcs binary but I get the above NPE and the preference doesn't save. The Standards dropdown is empty as well.
I got the same thing on OSX 10.6.2 but on XP using the win32 plugin I didn't get this error.
this fixed it for me on OSX 10.6.2
http://github.com/beberlei/netbeans-php-enhancements/issues/#issue/9/comment/247738
or at least it gave me a work a round
I was able to solve this issue (on NB 6.9.1 but I don't think it's version-specific) by adding a symlink to phpcs in /usr/bin (a location on my PATH environment variable). As soon as I did that, NB picked up the phpcs location automatically and populated the coding standards dropdown.
cd /usr/bin sudo ln -s /Applications/MAMP/bin/php5.3/bin/phpcs
Your paths may vary from the above; replace the path in the 2nd line with the location of phpcs on your system.
First click on "ok" in options dialogue has no effect, second one causes below NPE...
SEVERE [global] java.lang.NullPointerException at org.netbeans.core.startup.preferences.NbPreferences.put(NbPreferences.java:131) at de.whitewashing.php.cs.ui.options.CodeSnifferOptions.setCodingStandard(CodeSnifferOptions.java:49) at de.whitewashing.php.cs.ui.options.CodeSnifferOptionsPanel.store(CodeSnifferOptionsPanel.java:137) at de.whitewashing.php.cs.ui.options.CodeSnifferOptionsPanelController.applyChanges(CodeSnifferOptionsPanelController.java:28) at org.netbeans.modules.options.TabbedController.applyChanges(TabbedController.java:126) at org.netbeans.modules.options.CategoryModel$Category.applyChanges(CategoryModel.java:384) at org.netbeans.modules.options.CategoryModel$Category.access$1000(CategoryModel.java:313) at org.netbeans.modules.options.CategoryModel.save(CategoryModel.java:215) at org.netbeans.modules.options.OptionsPanel.save(OptionsPanel.java:207) at org.netbeans.modules.options.OptionsDisplayerImpl$OptionsPanelListener.actionPerformed(OptionsDisplayerImpl.java:331) at org.netbeans.core.windows.services.NbPresenter$ButtonListener.actionPerformed(NbPresenter.java:1274) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.Component.processMouseEvent(Component.java:6263) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6028) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4630) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168) at java.awt.Container.dispatchEventImpl(Container.java:2085) at java.awt.Window.dispatchEventImpl(Window.java:2475) at java.awt.Component.dispatchEvent(Component.java:4460) at java.awt.EventQueue.dispatchEvent(EventQueue.java:599) at org.casaburo.utils.textPopupMenu.TCPopupEventQueue.dispatchEvent(TCPopupEventQueue.java:87) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) [catch] at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)