Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException when adding a variable #2

Closed
jaspernbrouwer opened this issue Feb 25, 2014 · 7 comments
Closed

NullPointerException when adding a variable #2

jaspernbrouwer opened this issue Feb 25, 2014 · 7 comments
Assignees
Labels

Comments

@jaspernbrouwer
Copy link

In phpStorm versions 7.1.2 and 7.1.3

Stacktrace:

null
java.lang.NullPointerException
    at org.jetbrains.idea.project.filetemplate.configuration.TemplateVariableEditor.getName(TemplateVariableEditor.java:123)
    at org.jetbrains.idea.project.filetemplate.configuration.TemplateVariableEditor.doValidate(TemplateVariableEditor.java:116)
    at org.jetbrains.idea.project.filetemplate.configuration.TemplateVariableEditor$1.actionPerformed(TemplateVariableEditor.java:70)
    at javax.swing.JComboBox.fireActionEvent(JComboBox.java:1240)
    at javax.swing.JComboBox.setSelectedItem(JComboBox.java:567)
    at org.jdesktop.swingx.autocomplete.ComboBoxAdaptor.setSelectedItem(ComboBoxAdaptor.java:104)
    at org.jdesktop.swingx.autocomplete.AutoCompleteDocument.setSelectedItem(AutoCompleteDocument.java:317)
    at org.jdesktop.swingx.autocomplete.AutoCompleteDocument.insertString(AutoCompleteDocument.java:259)
    at javax.swing.text.JTextComponent.setText(JTextComponent.java:1697)
    at com.intellij.openapi.ui.FixedComboBoxEditor.setItem(FixedComboBoxEditor.java:72)
    at com.intellij.openapi.ui.ComboBox$MyEditor.setItem(ComboBox.java:351)
    at org.jdesktop.swingx.autocomplete.AutoCompleteComboBoxEditor.setItem(AutoCompleteComboBoxEditor.java:78)
    at com.intellij.openapi.ui.ComboBox$MyEditor.setItem(ComboBox.java:351)
    at javax.swing.JComboBox.configureEditor(JComboBox.java:1383)
    at javax.swing.plaf.basic.BasicComboBoxUI$Handler.contentsChanged(BasicComboBoxUI.java:1817)
    at javax.swing.plaf.basic.BasicComboBoxUI$Handler.intervalAdded(BasicComboBoxUI.java:1826)
    at javax.swing.AbstractListModel.fireIntervalAdded(AbstractListModel.java:130)
    at javax.swing.DefaultComboBoxModel.addElement(DefaultComboBoxModel.java:124)
    at javax.swing.JComboBox.addItem(JComboBox.java:696)
    at org.jetbrains.idea.project.filetemplate.configuration.TemplateVariableEditor.setDefaultVariables(TemplateVariableEditor.java:97)
    at org.jetbrains.idea.project.filetemplate.configuration.TemplateVariablesTable.addVariable(TemplateVariablesTable.java:76)
    at org.jetbrains.idea.project.filetemplate.configuration.TemplateVariablesConfigurationPanel$3.run(TemplateVariablesConfigurationPanel.java:31)
    at org.jetbrains.idea.project.filetemplate.configuration.TemplateVariablesConfigurationPanel$3.run(TemplateVariablesConfigurationPanel.java:28)
    at com.intellij.ui.ToolbarDecorator$3.doAdd(ToolbarDecorator.java:407)
    at com.intellij.ui.CommonActionsPanel$Buttons.performAction(CommonActionsPanel.java:65)
    at com.intellij.ui.CommonActionsPanel$MyActionButton.actionPerformed(CommonActionsPanel.java:222)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:162)
    at com.intellij.openapi.actionSystem.impl.ActionButton.a(ActionButton.java:170)
    at com.intellij.openapi.actionSystem.impl.ActionButton.a(ActionButton.java:133)
    at com.intellij.openapi.actionSystem.impl.ActionButton.processMouseEvent(ActionButton.java:311)
    at java.awt.Component.processEvent(Component.java:6179)
    at java.awt.Container.processEvent(Container.java:2084)
    at java.awt.Component.dispatchEventImpl(Component.java:4776)
    at java.awt.Container.dispatchEventImpl(Container.java:2142)
    at java.awt.Component.dispatchEvent(Component.java:4604)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4618)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4279)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4209)
    at java.awt.Container.dispatchEventImpl(Container.java:2128)
    at java.awt.Window.dispatchEventImpl(Window.java:2492)
    at java.awt.Component.dispatchEvent(Component.java:4604)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:717)
    at java.awt.EventQueue.access$400(EventQueue.java:82)
    at java.awt.EventQueue$2.run(EventQueue.java:676)
    at java.awt.EventQueue$2.run(EventQueue.java:674)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:690)
    at java.awt.EventQueue$3.run(EventQueue.java:688)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:687)
    at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:697)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:520)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:205)
    at java.awt.Dialog$1.run(Dialog.java:1049)
    at java.awt.Dialog$3.run(Dialog.java:1101)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Dialog.show(Dialog.java:1099)
    at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:786)
    at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:462)
    at com.intellij.openapi.ui.DialogWrapper.showAndGetOk(DialogWrapper.java:1543)
    at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1511)
    at com.intellij.ide.actions.ShowSettingsUtilImpl.a(ShowSettingsUtilImpl.java:72)
    at com.intellij.ide.actions.ShowSettingsUtilImpl.showSettingsDialog(ShowSettingsUtilImpl.java:54)
    at com.intellij.ide.MacOSApplicationProvider$Worker$1.handlePreferences(MacOSApplicationProvider.java:101)
    at com.apple.eawt._AppEventLegacyHandler$2.dispatchEvent(_AppEventLegacyHandler.java:90)
    at com.apple.eawt._AppEventLegacyHandler.sendEventToEachListenerUntilHandled(_AppEventLegacyHandler.java:168)
    at com.apple.eawt._AppEventLegacyHandler.handlePreferences(_AppEventLegacyHandler.java:88)
    at com.apple.eawt._AppEventHandler$_PreferencesDispatcher.performUsing(_AppEventHandler.java:253)
    at com.apple.eawt._AppEventHandler$_PreferencesDispatcher.performUsing(_AppEventHandler.java:244)
    at com.apple.eawt._AppEventHandler$_AppEventDispatcher$1.run(_AppEventHandler.java:489)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
    at java.awt.EventQueue.access$400(EventQueue.java:82)
    at java.awt.EventQueue$2.run(EventQueue.java:676)
    at java.awt.EventQueue$2.run(EventQueue.java:674)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)
    at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:697)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:524)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
vkravets added a commit that referenced this issue Feb 26, 2014
@vkravets
Copy link
Owner

Try to download manually prerelease of 0.4.1 from GitHub and check the issue, I will upload it in
5-10 min.

@vkravets vkravets added the bug label Feb 26, 2014
@vkravets vkravets self-assigned this Feb 26, 2014
@jaspernbrouwer
Copy link
Author

Sorry, when phpStorm restarts it hangs while loading the plugin, please see the image.

error

Tried reinstalling but the issue remains.

@vkravets
Copy link
Owner

Please download not sources for 0.4.1 release but binary:
https://github.com/vkravets/FileTemplatesVariable/releases/download/0.4.1/FileTemplatesVariable.jar

And try to install it via "Install From Disk" in the PhpStorm Plugin Manager.

Let me know if issue will be appeared again.

@jaspernbrouwer
Copy link
Author

By the way, some system info:

  • phpStorm 7.1.3 (#PS-133.982)
  • JRE 1.6.0_65-b14-462-11M4609 x86_64
  • OS X 10.9.1 (build 13B42)

@jaspernbrouwer
Copy link
Author

Ahh! I had a feeling I was doing something wrong there :)

Issue, resolved! I no longer get a NullPointerException and can add variables.

@vkravets
Copy link
Owner

Are using 0.4.1 binary which I mentioned above?

Please note when I will update this version on the Plugin Manager site
you will need to reinstall this plugin to have latest version. There will be
some fixes included to this version except this one.

Sorry for mess...

@jaspernbrouwer
Copy link
Author

Yes, I've use this link you gave me.

And no worries!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants