geowarin / gist-templates-plugin

An intellij plugin to fetch gists from one or several github gists account and use them as templates inside IntelliJ
19 stars 11 forks source link

NoSuchMethodError when invoking plugin #3

Closed michaelwills closed 10 years ago

michaelwills commented 10 years ago

My Github settings are in and correct and the Gist plugin settings are set to use my credentials. I get the error below when trying to use either to generate files or use the templates. I am using Intellij 13.1.1 build 135.480. This is for the current version available via the plugin manager. Let me know if there is something I can do to help resolve this. Looks like a neat project!

com.intellij.codeInsight.template.impl.ListTemplatesHandler.showTemplatesLookup(Lcom/intellij/openapi/project/Project;Lcom/intellij/openapi/editor/Editor;Ljava/lang/String;Ljava/util/List;)V: com.intellij.codeInsight.template.impl.ListTemplatesHandler.showTemplatesLookup(Lcom/intellij/openapi/project/Project;Lcom/intellij/openapi/editor/Editor;Ljava/lang/String;Ljava/util/List;)V
java.lang.NoSuchMethodError: com.intellij.codeInsight.template.impl.ListTemplatesHandler.showTemplatesLookup(Lcom/intellij/openapi/project/Project;Lcom/intellij/openapi/editor/Editor;Ljava/lang/String;Ljava/util/List;)V
    at com.gisttemplates.action.GistTemplateEditorAction$GistTemplateActionHandler.execute(GistTemplateEditorAction.java:32)
    at com.intellij.openapi.editor.actionSystem.EditorActionHandler.doExecute(EditorActionHandler.java:93)
    at com.intellij.openapi.editor.actionSystem.EditorActionHandler.execute(EditorActionHandler.java:125)
    at com.intellij.openapi.editor.actionSystem.EditorAction$1.run(EditorAction.java:83)
    at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:124)
    at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:94)
    at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:68)
    at com.intellij.ui.popup.PopupFactoryImpl$ActionPopupStep$1.run(PopupFactoryImpl.java:733)
    at com.intellij.ui.popup.AbstractPopup$18.run(AbstractPopup.java:1250)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.a(FocusManagerImpl.java:648)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.g(FocusManagerImpl.java:629)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.e(FocusManagerImpl.java:599)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.access$200(FocusManagerImpl.java:60)
    at com.intellij.openapi.wm.impl.FocusManagerImpl$IdleRunnable.runEdt(FocusManagerImpl.java:108)
    at com.intellij.openapi.util.EdtRunnable$1.run(EdtRunnable.java:28)
    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)
geowarin commented 10 years ago

Hey Michael, Thanks for the feedback!

Indeed the signature of the method changed in 13.1. I was still using 13.0. It should be fixed later today

geowarin commented 10 years ago

This should be fixed by a rather ugly hack (copy paste from intellij API). Unfortunately, the template mechanism has changed a lot in intellij 13.1. It is very handy to generate custom templates of a predetermined size via extension points but not so much for a dynamic list like we do.

TL;DR Closing the issue, it should be fixed in version 0.3.4. Michael, could you please update to the new version and confirm everything is ok ?

michaelwills commented 10 years ago

Thanks for the quick response! Something is still afoot as I now get RequestException from https://github.com/geowarin/gist-templates-plugin/blob/master/src/main/java/com/gisttemplates/gist/GistAccountFetcher.java#L41-41. Any additional logs I can supply for you? I also wonder if there are new changes in 13.1.1 as opposed to just 13.1.

geowarin commented 10 years ago

You are right to point this out, error handling is atrocious right now. I plan to replace the library used to fetch gists (https://github.com/eclipse/egit-github/tree/master/org.eclipse.egit.github.core) by my own very soon.

It is odd thought, RequestException is a real error sent by the github api so I'm guessing something else is wrong, maybe with your credentials...

In the meantime, I just released a v0.3.5 to provide more information. It would be very nice of you if you could keep on assisting me with this and check out the new version !

michaelwills commented 10 years ago

Not a problem and it's interesting. Just tried. Now it gives a Not Found (404).

geowarin commented 10 years ago

Well this is odd. Are you behind a proxy of some kind ? The request issued should be https://api.github.com/users/michaelwills/gists assuming your username is correct in the VCS settings