seanhenry / MockGenerator

An AppCode plugin to help generate Swift test doubles automatically.
GNU General Public License v3.0
71 stars 11 forks source link

Exception in AppCode #18

Closed pietrocaselani closed 6 years ago

pietrocaselani commented 6 years ago

Hi! I am using this plugin on AppCode with this specs:

AppCode 2018.1.2 EAP
Build #OC-181.4668.26, built on April 18, 2018
Subscription is active until April 27, 2018
JRE: 1.8.0_152-release-1136-b29 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.12.6

and I am facing an issue when I try to generate a mock. Here is the stacktrace:

com.jetbrains.swift.psi.SwiftTypeInheritanceClause.getReferenceTypeElementList()Ljava/util/List;
java.lang.NoSuchMethodError: com.jetbrains.swift.psi.SwiftTypeInheritanceClause.getReferenceTypeElementList()Ljava/util/List;
    at codes.seanhenry.util.finder.SwiftTypeItemFinder.getResolvedTypes(SwiftTypeItemFinder.java:74)
    at codes.seanhenry.util.finder.SwiftTypeItemFinder.findItems(SwiftTypeItemFinder.java:34)
    at codes.seanhenry.intentions.MockGeneratingIntention.getProtocolItemFinder(MockGeneratingIntention.java:121)
    at codes.seanhenry.intentions.MockGeneratingIntention.invoke(MockGeneratingIntention.java:80)
    at com.intellij.codeInsight.intention.PsiElementBaseIntentionAction.invoke(PsiElementBaseIntentionAction.java:43)
    at com.intellij.codeInsight.intention.impl.config.IntentionActionWrapper.invoke(IntentionActionWrapper.java:67)
    at com.intellij.codeInsight.intention.impl.IntentionActionWithTextCaching$MyIntentionAction.invoke(IntentionActionWithTextCaching.java:181)
    at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.b(ShowIntentionActionsHandler.java:211)
    at com.intellij.openapi.application.WriteAction.run(WriteAction.java:90)
    at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.a(ShowIntentionActionsHandler.java:213)
    at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.a(ShowIntentionActionsHandler.java:188)
    at com.intellij.openapi.application.TransactionGuardImpl.a(TransactionGuardImpl.java:88)
    at com.intellij.openapi.application.TransactionGuardImpl.submitTransactionAndWait(TransactionGuardImpl.java:153)
    at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.b(ShowIntentionActionsHandler.java:187)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.a(CoreCommandProcessor.java:137)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:95)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:85)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:71)
    at com.intellij.codeInsight.intention.impl.ShowIntentionActionsHandler.chooseActionAndInvoke(ShowIntentionActionsHandler.java:186)
    at com.intellij.codeInsight.intention.impl.IntentionListStep.d(IntentionListStep.java:293)
    at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:195)
    at com.intellij.ui.popup.AbstractPopup.a(AbstractPopup.java:1398)
    at com.intellij.util.ui.UIUtil.invokeLaterIfNeeded(UIUtil.java:2882)
    at com.intellij.ide.IdeEventQueue.a(IdeEventQueue.java:168)
    at com.intellij.ide.IdeEventQueue.executeWhenAllFocusEventsLeftTheQueue(IdeEventQueue.java:132)
    at com.intellij.openapi.wm.impl.FocusManagerImpl.doWhenFocusSettlesDown(FocusManagerImpl.java:190)
    at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.doWhenFocusSettlesDown(IdeFocusManagerImpl.java:56)
    at com.intellij.ui.popup.AbstractPopup.dispose(AbstractPopup.java:1392)
    at com.intellij.ui.popup.WizardPopup.dispose(WizardPopup.java:160)
    at com.intellij.ui.popup.list.ListPopupImpl.dispose(ListPopupImpl.java:307)
    at com.intellij.openapi.util.Disposer$1.execute(Disposer.java:48)
    at com.intellij.openapi.util.Disposer$1.execute(Disposer.java:44)
    at com.intellij.openapi.util.objectTree.ObjectNode$1.execute(ObjectNode.java:138)
    at com.intellij.openapi.util.objectTree.ObjectNode$1.execute(ObjectNode.java:107)
    at com.intellij.openapi.util.objectTree.ObjectTree.executeActionWithRecursiveGuard(ObjectTree.java:169)
    at com.intellij.openapi.util.objectTree.ObjectNode.execute(ObjectNode.java:107)
    at com.intellij.openapi.util.objectTree.ObjectTree.executeAll(ObjectTree.java:144)
    at com.intellij.openapi.util.Disposer.dispose(Disposer.java:129)
    at com.intellij.openapi.util.Disposer.dispose(Disposer.java:125)
    at com.intellij.ui.popup.WizardPopup.disposeAllParents(WizardPopup.java:263)
    at com.intellij.ui.popup.list.ListPopupImpl.handleNextStep(ListPopupImpl.java:442)
    at com.intellij.ui.popup.list.ListPopupImpl.a(ListPopupImpl.java:396)
    at com.intellij.ui.popup.list.ListPopupImpl.handleSelect(ListPopupImpl.java:337)
    at com.intellij.ui.popup.list.ListPopupImpl$1.actionPerformed(ListPopupImpl.java:250)
    at com.intellij.ui.popup.WizardPopup.a(WizardPopup.java:378)
    at com.intellij.ui.popup.WizardPopup.dispatch(WizardPopup.java:358)
    at com.intellij.ui.popup.PopupDispatcher.dispatchKeyEvent(PopupDispatcher.java:126)
    at com.intellij.ui.popup.PopupDispatcher.dispatch(PopupDispatcher.java:160)
    at com.intellij.ide.IdePopupManager.dispatch(IdePopupManager.java:87)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:674)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:395)
    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)

Can you help me?

seanhenry commented 6 years ago

Hi! Thanks for raising this issue. The problem is that a method has been removed from the 2018.1.2 SDK. I’m working on a fix now :)

seanhenry commented 6 years ago

This is now fixed. It will take a couple of days to appear in AppCode but you can download it here if you need to sooner.

seanhenry commented 6 years ago

Note that the new release only supports 2018.1.2 EAP+ so if you are switching between the EAP and 2018.1.1, you will need to switch between the new and old versions of this plugin too.

pietrocaselani commented 6 years ago

That was fast! Thanks!