martynassateika / CodeIgniter-phpstorm-plugin

PhpStorm plugin for CodeIgniter development
Apache License 2.0
20 stars 10 forks source link

error enabling plugin in PHPStorm 2016.1.1 #11

Closed jorgesoares closed 5 years ago

jorgesoares commented 5 years ago

Looking forward to using this plugin in PHPStorm 2016.1.1

Below is the output error when I restart PHPStorm

Plugin 'lt.martynassateika.idea.codeigniter' failed to initialize and will be disabled.  Please restart PhpStorm.

java.lang.NoClassDefFoundError: com/intellij/util/io/VoidDataExternalizer
    at lt.martynassateika.idea.codeigniter.language.LanguageFileIndex.getValueExternalizer(LanguageFileIndex.java:77)
    at com.intellij.util.indexing.FileBasedIndexImpl.a(FileBasedIndexImpl.java:432)
    at com.intellij.util.indexing.FileBasedIndexImpl.a(FileBasedIndexImpl.java:412)
    at com.intellij.util.indexing.FileBasedIndexImpl.i(FileBasedIndexImpl.java:298)
    at com.intellij.util.indexing.FileBasedIndexImpl.initComponent(FileBasedIndexImpl.java:375)
    at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:522)
    at com.intellij.openapi.components.impl.ComponentManagerImpl.createComponents(ComponentManagerImpl.java:123)
    at com.intellij.openapi.application.impl.ApplicationImpl.access$801(ApplicationImpl.java:92)
    at com.intellij.openapi.application.impl.ApplicationImpl$12.run(ApplicationImpl.java:500)
    at com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:142)
    at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:446)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:392)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:127)
    at com.intellij.openapi.application.impl.ApplicationImpl.createComponents(ApplicationImpl.java:516)
    at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:107)
    at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:458)
    at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:450)
    at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:194)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.intellij.idea.MainImpl$1$1$1.run(MainImpl.java:61)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:366)
    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)
Caused by: java.lang.ClassNotFoundException: com.intellij.util.io.VoidDataExternalizer PluginClassLoader[lt.martynassateika.idea.codeigniter, 0.4.0]
    at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:64)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 39 more
martynassateika commented 5 years ago

Thank you for the detailed message, @jorgesoares.

Indeed, it looks like I kept the same since-build value in the plugin.xml file since the very first version of this plugin: https://github.com/martynassateika/CodeIgniter-phpstorm-plugin/blob/0.4.0/resources/META-INF/plugin.xml#L49.

I will come up with a strategy to support multiple IntelliJ versions, probably by using multiple Git branches.

Thanks for your interest in the plugin!

martynassateika commented 5 years ago

Actually, we might get away with making several small changes to the code and keeping a single branch. At least for now.

Got it working with 2016.1.2. See the screenshot below, the argument to lang is folded.

I will need to figure out how to automate the build process before going live with this, however.

ci20161

martynassateika commented 5 years ago

I've asked about this in the IntelliJ OpenAPI forums.

I must have been building it wrong previously, as I now followed @YannCebron's advice and got a build that works with both PhpStorm 2016.1.1 and 2019.1.1 perfectly! 🎉

The new version should be available soon @jorgesoares.

martynassateika commented 5 years ago

Version 0.4.1 is now up for download.

martynassateika commented 5 years ago

Closing as I verified the plugin works on 2016.1.2. Let me know if you spot any other issues @jorgesoares.

jorgesoares commented 5 years ago

This is great, I can confirm its working. Thank you very much for addressing the issue.

martynassateika commented 5 years ago

Happy to help!