johna1203 / getGists

intelli-idea plugin getGists
https://github.com/johna1203/getGists
45 stars 15 forks source link

Incompatible with PhpStorm 8? #16

Open thiagodebastos opened 10 years ago

thiagodebastos commented 10 years ago

I can't get this plugin to work with PhpStorm 8 #PS-128.2071 x64 on Windows 8.1. Whenever I try to load 'Get Gist' I am returned with this error:

UnsupportedOperationException: JsonNull

Is this a known issue?

johna1203 commented 10 years ago

Is your github configuration right?

thiagodebastos commented 10 years ago

Yes I have tested it both with a token and with a password, both tests pass. Would you like some screenshots? Or the full error log?

johna1203 commented 10 years ago

Please send me both. I use PHPStorm-138.2071 but I'm not with this problem .. The difference is that I use in linux.

thiagodebastos commented 10 years ago

I can't wait to get my new PC and never, ever, everrr struggle with windows again. I only just gave in after fighting for a week to get Gulp working without breaking every hour.. Anyways, here are the screenshots:

connection to Github successful image

using the first 'Get Gist' option yields the dialogue at the bottom, which does not load anything. image

using the second option yields the error:

JsonNull
java.lang.UnsupportedOperationException: JsonNull
    at com.google.gson.JsonElement.getAsString(JsonElement.java:191)
    at com.kodokux.github.GithubGetGistAction$1.consume(GithubGetGistAction.java:77)
    at com.kodokux.github.GithubGetGistAction$1.consume(GithubGetGistAction.java:57)
    at com.kodokux.github.GithubGetGistAction$2.onSuccess(GithubGetGistAction.java:109)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl$8$2.run(ProgressManagerImpl.java:414)
    at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:318)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:744)
    at java.awt.EventQueue.access$400(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:697)
    at java.awt.EventQueue$3.run(EventQueue.java:691)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:714)
    at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:748)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:577)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:384)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
johna1203 commented 10 years ago

When I use it the same way as you're trying to, I can't get any gists.

I prefer to right click the file in which I want to get the gists, but this won't work either, because I've noticed that the plugin will only work if you have at least one tab open.

So, here's a workaround I suggest you to try:

  1. Open a file in a new tab
  2. Use the [Get Gists...] instead of [Get Gists] option (I don't really know why the plugin has two different options). T

hen you'll probably get this working! I promise I'll try to get this solved asap :)

thiagodebastos commented 10 years ago

Thank you for such a quick response! Hmm well, I don't use tabs at all, I have them switched off. Just now:

I have tried this with or without tabs and for some reason it only loaded the first gist..!

johna1203 commented 10 years ago

Is possible to use phpStorm without using tab? I did not know that.

Need to take the gist you must have a tab (editor / file) open. tries with a tab (editor / file) open.

but is this strange error appearing .....

get gists

thiagodebastos commented 10 years ago

Ahh right, by 'not tabs' I meant that I have them hidden (I do all my file browsing with a custom shortcut CTRL + P). When opening the Get Gist menu, I do so from an open file, where I get the error. Sorry for the misunderstanding!

lesschar commented 9 years ago

image image Why i just get the word 'Gists'?

silvafabio commented 6 years ago

Try this on: https://plugins.jetbrains.com/plugin/11080-use-gists