Closed svkx closed 5 years ago
Updated the Github Readme with a recommended layout. Check and advise of any differences to what you are using.
Small request for @grosenberg - Could you please upload a sample working Eclipse project into this github? That would be very helpful for people like me who are trying to use AntlrDT but are new to the Java ecosystem.
@deepankarsharma - try this net.certiv.toml.dev.zip
Thanks for responding promptly and for taking the time to create a standalone project.
I had to do a couple of things to get the project working from scratch on eclipse
Now I am stuck at the following stack traces.
java.lang.NoClassDefFoundError: org/eclipse/jdt/internal/corext/codemanipulation/OrganizeImportsOperation$IChooseImportQuery at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671) at java.lang.Class.getConstructor0(Class.java:3075) at java.lang.Class.newInstance(Class.java:412) at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:190) at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:934) at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:246) at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:63) at org.eclipse.core.internal.events.BuildManager.instantiateBuilder(BuildManager.java:963) at org.eclipse.core.internal.events.BuildManager.initializeBuilder(BuildManager.java:916) at org.eclipse.core.internal.events.BuildManager.getBuilder(BuildManager.java:601) at org.eclipse.core.internal.events.BuildManager.getBuilder(BuildManager.java:638) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:260) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:315) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:318) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:370) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:391) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:145) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) Caused by: java.lang.ClassNotFoundException: org.eclipse.jdt.internal.corext.codemanipulation.OrganizeImportsOperation$IChooseImportQuery cannot be found by net.certiv.antlrdt.core_4.7.0.20171212-2143 at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:511) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:414) at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:153) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 21 more
===================================================================
org.eclipse.core.runtime.CoreException: Plug-in "net.certiv.antlrdt.core" was unable to instantiate class "net.certiv.antlrdt.core.builder.AntlrDTBuilder". at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:200) at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:194) at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:934) at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:246) at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:63) at org.eclipse.core.internal.events.BuildManager.instantiateBuilder(BuildManager.java:963) at org.eclipse.core.internal.events.BuildManager.initializeBuilder(BuildManager.java:916) at org.eclipse.core.internal.events.BuildManager.getBuilder(BuildManager.java:601) at org.eclipse.core.internal.events.BuildManager.getBuilder(BuildManager.java:638) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:260) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:315) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:318) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:370) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:391) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:145) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) Caused by: java.lang.NoClassDefFoundError: org/eclipse/jdt/internal/corext/codemanipulation/OrganizeImportsOperation$IChooseImportQuery at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671) at java.lang.Class.getConstructor0(Class.java:3075) at java.lang.Class.newInstance(Class.java:412) at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:190) ... 16 more Caused by: java.lang.ClassNotFoundException: org.eclipse.jdt.internal.corext.codemanipulation.OrganizeImportsOperation$IChooseImportQuery cannot be found by net.certiv.antlrdt.core_4.7.0.20171212-2143 at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:511) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:414) at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:153) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 21 more
@grosenberg thank you for README updates and a sample project. This really helped me to move forward with NPE and compare sample project with mine. I used the version from Marketplace, I also notice the version on update site is the same with recent update.
I had to do similar steps as @deepankarsharma. In fact, I was able to reproduce the same exception on my project as well:
org.eclipse.core.runtime.CoreException: Plug-in "net.certiv.antlrdt.core" was unable to instantiate class "net.certiv.antlrdt.core.builder.AntlrDTBuilder".
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:200)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:194)
at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:934)
at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:246)
at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:63)
at org.eclipse.core.internal.events.BuildManager.instantiateBuilder(BuildManager.java:963)
at org.eclipse.core.internal.events.BuildManager.initializeBuilder(BuildManager.java:916)
at org.eclipse.core.internal.events.BuildManager.getBuilder(BuildManager.java:601)
at org.eclipse.core.internal.events.BuildManager.getBuilder(BuildManager.java:638)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:260)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:315)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:318)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:370)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:391)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:145)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:235)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.lang.NoClassDefFoundError: org/eclipse/jdt/internal/corext/codemanipulation/OrganizeImportsOperation$IChooseImportQuery
at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3110)
at java.base/java.lang.Class.getConstructor0(Class.java:3315)
at java.base/java.lang.Class.newInstance(Class.java:530)
at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:190)
... 16 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.jdt.internal.corext.codemanipulation.OrganizeImportsOperation$IChooseImportQuery cannot be found by net.certiv.antlrdt.core_4.7.0.20171212-2143
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:511)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:414)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:153)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
... 21 more
But this happens during the build process, looks like AntlrDT wasn't able to generate the code in my project. Similar with sample project, yet no Exception was thrown and net.certiv.toml.dev.parser.gen stayed empty unless I did the following maven trick. This time build happened with external mvn clean package
call and Lexer, Parser, Listeners Java classes have been compiled:
<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr4-maven-plugin</artifactId>
<version>4.7.1</version>
<executions>
<execution>
<id>Toml</id>
<goals>
<goal>antlr4</goal>
</goals>
<configuration>
<sourceDirectory>${project.basedir}/src/main/java/net/certiv/toml/dev/parser/</sourceDirectory>
<outputDirectory>${project.basedir}/src/main/java/net/certiv/toml/dev/parser/gen</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
Sample project appeared as following:
net.certiv.toml.dev/src/main/java
└── net
└── certiv
└── toml
└── dev
├── App.java
├── parser
│ ├── TomlLexer.g4
│ ├── TomlParser.g4
│ └── gen
│ ├── TomlLexer.interp
│ ├── TomlLexer.java
│ ├── TomlLexer.tokens
│ ├── TomlParser.interp
│ ├── TomlParser.java
│ ├── TomlParser.tokens
│ ├── TomlParserBaseListener.java
│ └── TomlParserListener.java
└── util
└── Strings.java
After that I open TokensView
widget, In integration window:
Project: net.certiv.toml.dev
Gen: TomlParser.g4
Snippets Dir: ../../parent-folder/net.certiv.toml.dev/test.snippets
Snippets Ext: toml
Token factory: {empty or TomlParser.tokens}
Parser Error strategy: {empty}
I was not sure if I need to specify anything in Token factory (as antlr framework is something new for me), tried to keep both empty and set to TomlParser.tokens. But once I set the value I cannot unset this.
After Integration setup I picked up both example-v0.3.0.toml
and example-v0.4.0.toml
, but nothing happens after that. All Lexer, Grammar, example files are open in editor, nothing happens on example editing. TokensView stays empty and no Exceptions thrown in workspace logs.
I'm running Eclipse on macOS, I was able to run Eclipse in console mode and forward errors from system output. This is what I get:
10:12:57.022 [Worker-1: Parse Tree Builder] ERROR net.certiv.antlrdt.ui.view.tokens.TargetUnit - Failed to load class 'net.certiv.toml.dev.parser.gen.TomlParser' (net.certiv.toml.dev.parser.gen.TomlParser)
10:12:57.024 [Worker-1: Parse Tree Builder] ERROR net.certiv.antlrdt.ui.view.tokens.TargetUnit - Failed to load class 'net.certiv.toml.dev.parser.gen.TomlLexer' (net.certiv.toml.dev.parser.gen.TomlLexer)
10:12:57.024 [Worker-1: Parse Tree Builder] ERROR java.lang.Class - Failed to find resource [name=TomlParser.tokens]
I still think there might be something off with my workspace configuration as your project is considered a working one. It is not clear for me why AntlrDTBuilder is not able to initialize on itself and I had to engage maven plugin for that, which is likely unnecessary if AntlrDT plugin should do the trick.
I keep digging, if you can give a couple of suggestions on ERRORs above I'm stuck with. I try to include as much debug information as possible. Let me know if you may need to get more, e.g. run eclipse plugin in debug mode somehow.
--
Now, speaking of my own project. The major difference I found is that my g4 files are stored in src/main/antlr4
and are getting built into src/main/java
. Though, both of them are in a build path, TokensView throws that NullPointerException in a first place. I just followed the recommended antlr4 setup, and, by default, antlr maven plugin looks into src/main/antlr4
. This might be a good test case for you to check. I still need to figure out what else can be different, but I would prefer to have the plugin working first with your sample project and then deal with my project layout.
Thank you for your quick response anyway! =)
Caused by: java.lang.NoClassDefFoundError: org/eclipse/jdt/internal/corext/codemanipulation/OrganizeImportsOperation$IChooseImportQuery
OrganizeImportsOperation
is a standard part of the JDT; indicates that the JDT is missing from your Eclipse installation?
@ssbiox while not preferred, using Maven to generate the grammar -> java files should be OK (the next version of AntlrDT will explicitly allow for use of such 'extra' source roots).
Be sure that you have 'Project → Build Automatically' so that the necessary class files are auto-generated. Verify that the class files exist under
10:12:57.022 [Worker-1: Parse Tree Builder] ERROR net.certiv.antlrdt.ui.view.tokens.TargetUnit - Failed to load class 'net.certiv.toml.dev.parser.gen.TomlParser' (net.certiv.toml.dev.parser.gen.TomlParser)
To produce the ParseTree and Tokens views, AntlrDT has to instantiate and execute the class files. The failure to load message indicates that the class files do not exist in the expected location.
@grosenberg it might be the problem with Eclipse 2018-09 then. I do have JDT installed by default, that is confirmed in "Installation Details" and update site won't allow to install it again. This is a list of all org.eclipse.jdt.* jars available in plugins folder:
/Applications/Eclipse.app/Contents/Eclipse/plugins$ tree | grep jdt
├── org.eclipse.jdt.annotation.source_1.1.300.v20180905-0314.jar
├── org.eclipse.jdt.annotation.source_2.2.100.v20180905-0314.jar
├── org.eclipse.jdt.annotation_1.1.300.v20180905-0314.jar
├── org.eclipse.jdt.annotation_2.2.100.v20180905-0314.jar
├── org.eclipse.jdt.apt.core.source_3.6.100.v20180905-0315.jar
├── org.eclipse.jdt.apt.core_3.6.100.v20180905-0315.jar
├── org.eclipse.jdt.apt.pluggable.core.source_1.2.200.v20180905-0315.jar
├── org.eclipse.jdt.apt.pluggable.core_1.2.200.v20180905-0315.jar
├── org.eclipse.jdt.apt.ui.source_3.6.100.v20180905-0315.jar
├── org.eclipse.jdt.apt.ui_3.6.100.v20180905-0315.jar
├── org.eclipse.jdt.compiler.apt.source_1.3.300.v20180905-0315.jar
├── org.eclipse.jdt.compiler.apt_1.3.300.v20180905-0315.jar
├── org.eclipse.jdt.compiler.tool.source_1.2.300.v20180905-0319.jar
├── org.eclipse.jdt.compiler.tool_1.2.300.v20180905-0319.jar
├── org.eclipse.jdt.core.manipulation.source_1.10.100.v20180829-0618.jar
├── org.eclipse.jdt.core.manipulation_1.10.100.v20180829-0618.jar
├── org.eclipse.jdt.core.source_3.15.0.v20180905-0317.jar
├── org.eclipse.jdt.core_3.15.0.v20180905-0317.jar
├── org.eclipse.jdt.debug.source_3.12.0.v20180827-1040.jar
├── org.eclipse.jdt.debug.ui.source_3.10.0.v20180827-1040.jar
├── org.eclipse.jdt.debug.ui_3.10.0.v20180827-1040.jar
├── org.eclipse.jdt.debug_3.12.0.v20180827-1040
├── org.eclipse.jdt.doc.isv_3.14.100.v20180905-0558.jar
├── org.eclipse.jdt.doc.user_3.15.0.v20180905-1254.jar
├── org.eclipse.jdt.junit.core.source_3.10.100.v20180829-0645.jar
├── org.eclipse.jdt.junit.core_3.10.100.v20180829-0645.jar
├── org.eclipse.jdt.junit.runtime.source_3.4.800.v20180829-0645.jar
├── org.eclipse.jdt.junit.runtime_3.4.800.v20180829-0645.jar
├── org.eclipse.jdt.junit.source_3.11.100.v20180829-0645.jar
├── org.eclipse.jdt.junit4.runtime.source_1.1.800.v20180829-0645.jar
├── org.eclipse.jdt.junit4.runtime_1.1.800.v20180829-0645.jar
├── org.eclipse.jdt.junit5.runtime.source_1.0.200.v20180829-0645.jar
├── org.eclipse.jdt.junit5.runtime_1.0.200.v20180829-0645.jar
├── org.eclipse.jdt.junit_3.11.100.v20180829-0645.jar
├── org.eclipse.jdt.launching.macosx.source_3.4.200.v20180823-0805.jar
├── org.eclipse.jdt.launching.macosx_3.4.200.v20180823-0805.jar
├── org.eclipse.jdt.launching.source_3.11.0.v20180827-1040.jar
├── org.eclipse.jdt.launching.ui.macosx.source_1.2.200.v20180823-0805.jar
├── org.eclipse.jdt.launching.ui.macosx_1.2.200.v20180823-0805.jar
├── org.eclipse.jdt.launching_3.11.0.v20180827-1040.jar
├── org.eclipse.jdt.ui.source_3.15.0.v20180829-2215.jar
├── org.eclipse.jdt.ui_3.15.0.v20180829-2215.jar
├── org.eclipse.jdt_3.15.0.v20180906-0745.jar
It seems like org.eclipse.jdt.internal.corext
package is no longer there?
As for the other questions: I do have Automatic Builds available and class files are found inside target folder and jar:
├── classes
│ └── net
│ └── certiv
│ └── toml
│ └── dev
│ ├── App.class
│ ├── parser
│ │ └── gen
│ │ ├── TomlLexer.class
│ │ ├── TomlParser$ArrayContext.class
│ │ ├── TomlParser$DottedIDContext.class
│ │ ├── TomlParser$ElementContext.class
│ │ ├── TomlParser$InlineTableContext.class
│ │ ├── TomlParser$KeyContext.class
│ │ ├── TomlParser$ScalarContext.class
│ │ ├── TomlParser$StringContext.class
│ │ ├── TomlParser$TableArrayContext.class
│ │ ├── TomlParser$TableContext.class
│ │ ├── TomlParser$TomlContext.class
│ │ ├── TomlParser$ValueContext.class
│ │ ├── TomlParser.class
│ │ ├── TomlParserBaseListener.class
│ │ └── TomlParserListener.class
│ └── util
│ └── Strings.class
Should I be able to run the plugin on latest Eclipse? Or should I downgrade to 4.5.2 as mentioned in documentation? Which Eclipse version supported?
@ssbiox
1) It is part of the org.eclipse.jdt.core.manipulation
bundle. Have you installed any other plugin that might change/interfere the JDT, such as Scala or Koltin?
2) In any case, need to see your configuration ('Help → About → Installation Details → Configuration'). Preferably attach to a reply as a file.
3) are the class files under /classes/ or /target/classes/ ?
4) AntlrDT runs just fine, as it should, on the latest Eclipse version (for me on Windows)
Eclipse IDE for Java Developers Version: 2018-09 (4.9.0) Build id: 20180917-1800
@grosenberg
org.eclipse.jdt.core.manipulation
/Applications/Eclipse.app/Contents/Eclipse/plugins$ find . -name '*jdt.core*.jar' -print0 | xargs -0 -I '{}' sh -c 'jar tf {} | grep OrganizeImportsOperation && echo {}'
org/eclipse/jdt/core/manipulation/OrganizeImportsOperation.class
org/eclipse/jdt/core/manipulation/OrganizeImportsOperation$UnresolvableImportMatcher.class
org/eclipse/jdt/core/manipulation/OrganizeImportsOperation$TypeReferenceProcessor.class
org/eclipse/jdt/core/manipulation/OrganizeImportsOperation$1.class
org/eclipse/jdt/core/manipulation/OrganizeImportsOperation$TypeReferenceProcessor$UnresolvedTypeData.class
org/eclipse/jdt/core/manipulation/OrganizeImportsOperation$IChooseImportQuery.class
./org.eclipse.jdt.core.manipulation_1.10.100.v20180829-0618.jar
/Applications/Eclipse.app/Contents/Eclipse/plugins$ md5 org.eclipse.jdt.core.manipulation_1.10.100.v20180829-0618.jar MD5 (org.eclipse.jdt.core.manipulation_1.10.100.v20180829-0618.jar) = f8e41e71b8eb232dd72b1e4a6f089905
2. Let me know if I can send you the configuration directly, a little concern that it may contain any private host information. Probably, it's not really necessary since I found a mismatch in macOS version
3. Class files are generated by maven under target/classes and also bundled into the jar.
4. Good to hear, but apparently the jdt jar is different for mac.
@ssbiox Please send the configuration to support@certiv.net
.
There should not be such a difference in the jars. Looking in eclipse-java-2018-09-macosx-cocoa-x86_64.dmg
I can see the jar has the same content (both by the filenames in the relevant subdir and the size of the jar) as compared to the same jar in my working Windows installation.
Name: org.eclipse.jdt.core.manipulation_1.10.100.v20180829-0618.jar
Size: 500 826
Created: 2018-09-17 12:03:44
Do you have old and/or 32-bit versions of Eclipse installed?
Hopefully the configuration will illuminate the problem.
@grosenberg Hmm, that is very interesting. I use the same latest 64 bit setup file from here: https://www.eclipse.org/downloads/packages/release/2018-09/r/eclipse-ide-java-developers Reinstalled from scratch, vanilla version, no extra plugins installed. About shows:
Eclipse IDE for Java Developers
Version: 2018-09 (4.9.0)
Build id: 20180917-1800
Jar looks like the same size:
ls -la org.eclipse.jdt.core.manipulation_1.10.100.v20180829-0618.jar
-rw-r--r--@ 1 xxx admin 500826 Sep 17 16:05 org.eclipse.jdt.core.manipulation_1.10.100.v20180829-0618.jar
I'll send you the configuration shortly.
@grosenberg I've also checked Windows installation of "Eclipse IDE for Java Developers" edition; version: 2018-09 (4.9.0); build id: 20180917-1800. It looks like OrganizeImportsOperation has been moved as well within org.eclipse.jdt.core.manipulation_1.10.100.v20180829-0618.jar
Unfortunately, the current public version of AntlrDT is not fully compatible with Eclipse 2018-09. This will be true on both Windows and Mac. As a bit of a hack, if both Eclipse Photon and Eclipse 2018-09 are installed, AntlrDT will work regardless of which version of Eclipse is run (at least on Windows -- both versions populate the same local .p2 repository with the class files necessary for the builder to instantiate and build the Antlr grammars.
Certainly, downgrading to Eclipse Photon will work.
Currently working on a point upgrade that will fix this problem.
I have both Photon and 2018-09 installed, but it still does not work for me. Is there some kind of trick to getting it to work?
@james-bryant-entrust I haven't found any workaround at the moment and gave up using the tool until it's fixed with latest Eclipse. I believe the short term solution might be an eclipse bundle with compatible plugins and default workspace and sample project; Eclipse API seems like not always backward compatible.
Fixed in newest release.
Hi, @grosenberg
I got the following exception when opening Tokens View, I went through documentations and other git reported similar issues, nothing helps:
My setup is Eclipse 2018-09 (4.9.0). I included all g4 files, generated sources and testing text files into build path, automatic builds work just fine. There might be some bug with handling packages, based on the exception stack. I checked the jar where that issue is getting thrown:
net.certiv.antlrdt.ui.view.tokens.GrammarRecord.genPackageNames(GrammarRecord.java:70)
. It doesn't seem like any process has started that it's unable to find a resource but it's likely the problem with AntlrDTCore initialization.I tried a few different installations: From Eclipse marketplace and from update sites. Marketplace installation includes Zest dependency, though, as mentioned in another git issue I tried to install Zest manually, that is v 1.7.0 currently. In fact, Marketplace version of AntlrDT references to the same 1.7.0 Zest version.
The problem hasn't gone away. If that Eclipse 2018-09 incompatibility issue then this is unfortunate for me. Please let me know if anything else can cause the NullPointerException.