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 :

      @NotNull
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

0

I Forgot to add that the only way to close the VCS Options dialog is then to Kill the whole IDEA process unfortunately

0

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.

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/j
ava/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-i
mpl/src/com/intellij/openapi/vcs/configurable/VcsManagerConfigurable.j
ava;h=d23db396e4e3a8cb8c13f1d7b387c3df54eb9f92;hb=HEAD something seems
wrong :

@NotNull

http://git.jetbrains.org/#l216       public String getId() {

http://git.jetbrains.org/#l217         return delegate instanceof
SearchableConfigurable ? ((SearchableConfigurable) delegate).getId() :
getHelpTopic();

http://git.jetbrains.org/#l218       }

http://git.jetbrains.org/#l219

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   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,s
cancode=1] on
javax.swing.JButton[,0,0,73x23,alignmentX=0.0,alignmentY=0.5,border=co
m.incors.plaf.alloy.ct@10c24f7,flags=296,maximumSize=,minimumSize=,pre
ferredSize=,defaultIcon=,disabledIcon=,disabledSelectedIcon=,margin=ja
va.awt.Insets[top=2,left=16,bottom=2,right=16],paintBorder=true,paintF
ocus=true,pressedIcon=,rolloverEnabled=true,rolloverIcon=,rolloverSele
ctedIcon=,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(V
csManagerConfigurable.java:217)
at
com.intellij.openapi.options.newEditor.OptionsEditorDialog.a(OptionsEd
itorDialog.java:147)
at
com.intellij.openapi.options.newEditor.OptionsEditorDialog.doCancelAct
ion(OptionsEditorDialog.java:214)
at
com.intellij.openapi.ui.DialogWrapper.doCancelAction(DialogWrapper.jav
a:658)
at
com.intellij.openapi.options.newEditor.OptionsEditorDialog.doCancelAct
ion(OptionsEditorDialog.java:209)
at
com.intellij.openapi.ui.DialogWrapper$9.actionPerformed(DialogWrapper.
java:1206)
at
javax.swing.JComponent$ActionStandin.actionPerformed(JComponent.java:3
368)
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:21
6)
at
javax.swing.JComponent.processKeyBindingsForAllComponents(JComponent.j
ava: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.jav
a:1850)
at
java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardF
ocusManager.java:712)
at
java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboa
rdFocusManager.java:990)
at
java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboa
rdFocusManager.java:855)
at
java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocu
sManager.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(EventDispatchThrea
d.java:269)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.j
ava:184)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.j
ava: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(Dialo
gWrapperPeerImpl.java:675)
at
com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperP
eerImpl.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.j
ava:59)
at
com.intellij.ide.actions.ShowSettingsUtilImpl.showSettingsDialog(ShowS
ettingsUtilImpl.java:45)
at
com.intellij.ide.actions.ShowSettingsAction.actionPerformed(ShowSettin
gsAction.java:53)
at
com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$3.performAction
(IdeKeyEventDispatcher.java:524)
at
com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(I
deKeyEventDispatcher.java:564)
at
com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.d(IdeKeyEventDi
spatcher.java:444)
at
com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEven
t(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(EventDispatchThrea
d.java:269)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.j
ava:184)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThrea
d.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   ERROR -
com.intellij.ide.IdeEventQueue - IntelliJ IDEA 10.0.2  Build
#IU-103.72
2011-02-14 13:08:00,380   ERROR -
com.intellij.ide.IdeEventQueue - JDK: 1.6.0_21 2011-02-14 13:08:00,380
  ERROR - com.intellij.ide.IdeEventQueue - VM: Java
HotSpot(TM) Client VM 2011-02-14 13:08:00,380   ERROR -
com.intellij.ide.IdeEventQueue - Vendor: Sun Microsystems Inc.
2011-02-14 13:08:00,380   ERROR -
com.intellij.ide.IdeEventQueue - OS: Windows XP 2011-02-14
13:08:00,380   ERROR - com.intellij.ide.IdeEventQueue - Last
Action: ShowSettings

---
Original message URL:
http://devnet.jetbrains.net/message/5286452#5286452


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

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 !

0

Hello Thibaut,

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 !


The inspections do fire on our code. :)

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

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

0

请先登录再写评论。