Issue with plugin configuration and 10.0.2
Since upgrading (this morning) to 10.0.2, I get this exception when I try to validate my plugin (mks integration) configuration.
I'm not sure what is causing this issue, the plugin still compiles with the new IDEA SDK.
To be noted: the plugin configuration (http://code.google.com/p/ideamksplugin/source/browse/trunk/src/main/java/org/intellij/vcs/mks/MksConfiguration.java) class still implement JDOMExternalizable
Looking at http://git.jetbrains.org/?p=idea/community.git;a=blob;f=platform/vcs-impl/src/com/intellij/openapi/vcs/configurable/VcsManagerConfigurable.java;h=d23db396e4e3a8cb8c13f1d7b387c3df54eb9f92;hb=HEAD something seems wrong :
216 public String getId() {
217 return delegate instanceof SearchableConfigurable ? ((SearchableConfigurable) delegate).getId() : getHelpTopic();
218 }
219
If I understand the above correctly, this assumes each Configurable subclass need to implement a not null getHelpTopic() method, but this method is specified @org.jetbrains.annotations.Nullable on com.intellij.openapi.options.Configurable.
Did I miss something ?
2011-02-14 13:08:00,380 [5646178] ERROR - com.intellij.ide.IdeEventQueue - Error during dispatching of java.awt.event.KeyEvent[KEY_PRESSED,keyCode=27,keyText=Esc,keyChar=Esc,keyLocation=KEY_LOCATION_STANDARD,rawCode=27,primaryLevelUnicode=27,scancode=1] on javax.swing.JButton[,0,0,73x23,alignmentX=0.0,alignmentY=0.5,border=com.incors.plaf.alloy.ct@10c24f7,flags=296,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledIcon=,disabledSelectedIcon=,margin=java.awt.Insets[top=2,left=16,bottom=2,right=16],paintBorder=true,paintFocus=true,pressedIcon=,rolloverEnabled=true,rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,text=OK,defaultCapable=true]
java.lang.IllegalStateException: @NotNull method com/intellij/openapi/vcs/configurable/VcsManagerConfigurable$4.getId must not return null
at com.intellij.openapi.vcs.configurable.VcsManagerConfigurable$4.getId(VcsManagerConfigurable.java:217)
at com.intellij.openapi.options.newEditor.OptionsEditorDialog.a(OptionsEditorDialog.java:147)
at com.intellij.openapi.options.newEditor.OptionsEditorDialog.doCancelAction(OptionsEditorDialog.java:214)
at com.intellij.openapi.ui.DialogWrapper.doCancelAction(DialogWrapper.java:658)
at com.intellij.openapi.options.newEditor.OptionsEditorDialog.doCancelAction(OptionsEditorDialog.java:209)
at com.intellij.openapi.ui.DialogWrapper$9.actionPerformed(DialogWrapper.java:1206)
at javax.swing.JComponent$ActionStandin.actionPerformed(JComponent.java:3368)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1633)
at javax.swing.JComponent.processKeyBinding(JComponent.java:2851)
at javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:267)
at javax.swing.KeyboardManager.fireKeyboardAction(KeyboardManager.java:216)
at javax.swing.JComponent.processKeyBindingsForAllComponents(JComponent.java:2928)
at javax.swing.JComponent.processKeyBindings(JComponent.java:2920)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2814)
at java.awt.Component.processEvent(Component.java:6044)
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.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1850)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:712)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:990)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:855)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:676)
at java.awt.Component.dispatchEventImpl(Component.java:4502)
at java.awt.Container.dispatchEventImpl(Container.java:2099)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4460)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:652)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:492)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:404)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:368)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:178)
at java.awt.Dialog$1.run(Dialog.java:1046)
at java.awt.Dialog$3.run(Dialog.java:1098)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Dialog.show(Dialog.java:1096)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:675)
at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:412)
at com.intellij.openapi.ui.DialogWrapper.showAndGetOk(DialogWrapper.java:1175)
at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1160)
at com.intellij.ide.actions.ShowSettingsUtilImpl.a(ShowSettingsUtilImpl.java:59)
at com.intellij.ide.actions.ShowSettingsUtilImpl.showSettingsDialog(ShowSettingsUtilImpl.java:45)
at com.intellij.ide.actions.ShowSettingsAction.actionPerformed(ShowSettingsAction.java:53)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$3.performAction(IdeKeyEventDispatcher.java:524)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:564)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.d(IdeKeyEventDispatcher.java:444)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:197)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:491)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:404)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:368)
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)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
2011-02-14 13:08:00,380 [5646178] ERROR - com.intellij.ide.IdeEventQueue - IntelliJ IDEA 10.0.2 Build #IU-103.72
2011-02-14 13:08:00,380 [5646178] ERROR - com.intellij.ide.IdeEventQueue - JDK: 1.6.0_21
2011-02-14 13:08:00,380 [5646178] ERROR - com.intellij.ide.IdeEventQueue - VM: Java HotSpot(TM) Client VM
2011-02-14 13:08:00,380 [5646178] ERROR - com.intellij.ide.IdeEventQueue - Vendor: Sun Microsystems Inc.
2011-02-14 13:08:00,380 [5646178] ERROR - com.intellij.ide.IdeEventQueue - OS: Windows XP
2011-02-14 13:08:00,380 [5646178] ERROR - com.intellij.ide.IdeEventQueue - Last Action: ShowSettings
请先登录再写评论。
I Forgot to add that the only way to close the VCS Options dialog is then to Kill the whole IDEA process unfortunately
Hello Thibaut,
It's true that the code makes an assumption that isn't documented anywhere
(but is true for all of our VCS configurables). I recommend implementing
the SearchableConfigurable interface in the Configurable of your plugin.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Thanks for the reply dmitry, I'll see if this is easy (implementing SearchableConfigurable).
However, if you intend on keeping that assumption, you should make #getHelpTopic @Notnull rather than Nullable I believe.
Actually i'm even surprised IDEA NotNull inspections don't fire on your code as you're clearly using a @Nullable as a return value of a @NotNull method !
Hello Thibaut,
The inspections do fire on our code. :)
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Dmitry, any hints on what org.intellij.vcs.mks.MksConfigurableForm#enableSearch should do ?
I looked at svn and git plugins implementation but their configurable only implements Configurable