code generation of toString failing
For a simple java bean running on Mac OSX Build 8664 JDK 1.5 I get this error when I try to use the toString generation.
Error during dispatching of java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=com.intellij.ui.popup.PopupFactoryImpl$ActionPopupStep$1@fb0af3,notifier=null,catchExceptions=false,when=1219077746888] on apple.awt.CToolkit@2c510f: com.intellij.psi.PsiManager.getElementFactory()Lcom/intellij/psi/PsiElementFactory;
java.lang.NoSuchMethodError: com.intellij.psi.PsiManager.getElementFactory()Lcom/intellij/psi/PsiElementFactory;
at generate.tostring.psi.PsiAdapter.getPsiElemetFactory(PsiAdapter.java:71)
at generate.tostring.GenerateToStringActionHandlerImpl.doExecuteAction(GenerateToStringActionHandlerImpl.java:117)
at generate.tostring.GenerateToStringActionHandlerImpl.executeWriteAction(GenerateToStringActionHandlerImpl.java:78)
at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler$1.run(EditorWriteActionHandler.java:51)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:222)
at com.intellij.openapi.editor.actionSystem.EditorWriteActionHandler.execute(EditorWriteActionHandler.java:35)
at com.intellij.openapi.editor.actionSystem.EditorAction$1.run(EditorAction.java:60)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:143)
at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:67)
at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:46)
at com.intellij.ui.popup.PopupFactoryImpl$ActionPopupStep$1.run(PopupFactoryImpl.java:3)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at com.intellij.ide.IdeEventQueue.c(IdeEventQueue.java:44)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:42)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:224)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
请先登录再写评论。
Hello Neil,
The 'Generate toString()' plugin is now bundled. Please remove the installation
of the plugin from the config/plugins directory.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
I also get this exception running under Ubuntu 8.04. I uninstalled it from within IntelliJ itself. How can I install it again? I can see the 'GenerateToString' plugin version 4.0.7. Is this the correct one?
regards,
Wim
Hello Wim,
No, you shouldn't install any version of GenerateToString from the plugin
repository. If you have uninstalled the bundled plugin, please reinstall
IntelliJ IDEA itself.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Now it works fine. But when I look at the 'plugins' page in the settings, it shows that the plugin has version 4.0.6 and is outdated. When I update to 4.0.7 it no longer works. I will leave it now at 4.0.6, but I guess 4.0.7 should be made to work also?
regards,
Wim
Hello Nathan,
>>> Now it works fine. But when I look at the 'plugins' page in the
>>> settings, it shows that the plugin has version 4.0.6 and is
>>> outdated. When I update to 4.0.7 it no longer works. I will leave it
>>> now at 4.0.6, but I guess 4.0.7 should be made to work also?
>>>
>> Please ignore the version number of the bundled plugin. The bundled
>> version is actually newer than the one in the plugin repository.
>>
Right. We'll patch the plugin management UI so that it never shows the "later
version available" notification for bundled plugins.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Hello Wim,
Please ignore the version number of the bundled plugin. The bundled version
is actually newer than the one in the plugin repository.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Dmitry Jemerov wrote:
>> Now it works fine. But when I look at the 'plugins' page in the
>> settings, it shows that the plugin has version 4.0.6 and is outdated.
>> When I update to 4.0.7 it no longer works. I will leave it now at
>> 4.0.6, but I guess 4.0.7 should be made to work also?
Should we also do the same with IntelliLang for Diana? It's coming up
as a new version is available too, but I think it is bundled now no?
N.
The String generation now works after I reinstalled.
However, I do I edit the template used to generate everything?
Thanks,
Neil
You need to do toString() once (using ALT-INS). You will get a settings dialog then. I also did not find any settings in the normal settings dialog.
regards,
Wim
Hello Wim,
They were removed from the settings dialog in order to reduce clutter and
bring them closer to the context where they are relevant.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Ok now that I have the template available is there a document that shows how to program in the template code?
Thanks,
Neil