Complete step is available in this tutorial:
https://platform.netbeans.org/tutorials/nbm-javacc-parser.html

You can also get the complete source code of the tutorial to avoid all the
steps:
https://github.com/vparfonov/api-samples/tree/master/nb-api-samples~api-samples/versions/7.2/tutorials/SimpleJava2


   1. Open Project  SimpleJava2
   2. You should miss  File Template dependency. Add it
   3. Run SimpleJava2 project
   4. open a SJ file (sample.sj) containing a java like source code =>
   Exception occur  (java.lang.ClassCastException:)
   5. update SJParserResult class to extend o.n.m.csl.spi.ParserResult
   instead of o.n.m.parsing.spi.Parser.Result like suggest here
   https://bz.apache.org/netbeans/show_bug.cgi?id=167064
   6. Rerun the Project, you should get now  java.lang.NullPointerException


Env is:
Product Version: Apache NetBeans IDE 11.1
Updates: NetBeans IDE is updated to version NetBeans 8.2 Patch 2
Java: 1.8.0_181; Java HotSpot(TM) 64-Bit Server VM 25.181-b13
Runtime: Java(TM) SE Runtime Environment 1.8.0_181-b13
System: Windows 10 version 10.0 running on amd64; Cp1252; en_US (nb)
User directory: C:\Users\xxxx\AppData\Roaming\NetBeans\11.1
Cache directory: C:\Users\xxxx\AppData\Local\NetBeans\Cache\11.1

Thanks



Le ven. 31 janv. 2020 à 18:37, Geertjan Wielenga <geert...@apache.org> a
écrit :
>
> Complete environment and precise steps to take to reproduce the problem.
>
> Gj
>
> On Fri, Jan 31, 2020 at 6:35 PM Bilu Al <albi...@gmail.com> wrote:
>>
>> Any advice hear please?
>>
>>
>> Le jeu. 30 janv. 2020 à 16:53, Bilu Al <albi...@gmail.com> a écrit :
>> >
>> > Hello,
>> >
>> > Can somebody tell if this tutorial still up to date:
https://platform.netbeans.org/tutorials/nbm-javacc-parser.html with  Apache
NetBeans IDE 11.1 platform?
>> >
>> > I am facing an issue when implementing this in my module
>> >
>> > I have the same issue with the complete tutorial source code :
https://github.com/vparfonov/api-samples/tree/master/nb-api-samples~api-samples/versions/7.2/tutorials/SimpleJava2
>> >
>> >  i am getting this exception:
>> >
>> > java.lang.ClassCastException:
org.simplejava.parser.SJParser$SJParserResult cannot be cast to
org.netbeans.modules.csl.spi.ParserResult
>> > at
org.netbeans.modules.csl.hints.infrastructure.SuggestionsTask.run(SuggestionsTask.java:54)
>> > at
org.netbeans.modules.parsing.impl.TaskProcessor.callParserResultTask(TaskProcessor.java:561)
>> > [catch] at
org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.run(TaskProcessor.java:786)
>> > at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279)
>> > at
org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.execute(TaskProcessor.java:702)
>> > at
org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:663)
>> > at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>> > at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>> > at
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
>> > at
org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
>> > at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
>> > at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
>> >
>> > I follow the fix here:
https://bz.apache.org/netbeans/show_bug.cgi?id=167064 about the previous
exception and now i am getting this indefinitely :
>> >
>> > java.lang.NullPointerException
>> > at
org.netbeans.modules.csl.hints.GsfHintsProvider.computeErrors(GsfHintsProvider.java:114)
>> > at
org.netbeans.modules.csl.hints.GsfHintsProvider.processErrors(GsfHintsProvider.java:388)
>> > at
org.netbeans.modules.csl.hints.GsfHintsProvider.processErrorsRecursive(GsfHintsProvider.java:359)
>> > at
org.netbeans.modules.csl.hints.GsfHintsProvider.refreshErrors(GsfHintsProvider.java:327)
>> > at
org.netbeans.modules.csl.hints.GsfHintsProvider.access$200(GsfHintsProvider.java:79)
>> > at
org.netbeans.modules.csl.hints.GsfHintsProvider$2.run(GsfHintsProvider.java:407)
>> > at
org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:586)
>> > at
org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:130)
>> > at
org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:114)
>> > at
org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:181)
>> > at
org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:178)
>> > at
org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:153)
>> > at
org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:335)
>> > at
org.netbeans.modules.parsing.nb.DataObjectEnvFactory.runPriorityIO(DataObjectEnvFactory.java:118)
>> > at
org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:67)
>> > at
org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:178)
>> > Caused: org.netbeans.modules.parsing.spi.ParseException
>> > at
org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:186)
>> > at
org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:81)
>> > [catch] at
org.netbeans.modules.csl.hints.GsfHintsProvider.run(GsfHintsProvider.java:405)
>> > at
org.netbeans.modules.csl.hints.GsfHintsProvider.run(GsfHintsProvider.java:79)
>> > at
org.netbeans.modules.parsing.impl.TaskProcessor.callParserResultTask(TaskProcessor.java:561)
>> > at
org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.run(TaskProcessor.java:786)
>> > at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279)
>> > at
org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.execute(TaskProcessor.java:702)
>> > at
org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:663)
>> > at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>> > at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>> > at
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
>> > at
org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
>> > at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
>> > at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
>> >
>> > Thanks you
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
>> For additional commands, e-mail: users-h...@netbeans.apache.org
>>
>> For further information about the NetBeans mailing lists, visit:
>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>>

Reply via email to