eclipse-archived / ceylon.tool.converter.java2ceylon

Java to Ceylon converter
Apache License 2.0
10 stars 7 forks source link

Autocompleter crashes Paste Java as Ceylon #10

Open gavinking opened 9 years ago

gavinking commented 9 years ago

This file:

https://raw.githubusercontent.com/ceylon/ceylon-web-ide-backend/master/src/main/java/com/redhat/ceylon/js/repl/Autocompleter.java

Seems to crash the converter.

bjansen commented 9 years ago

I'm pretty sure this is caused by the slowness described in #5:

[ 876746]  ERROR - llij.ide.plugins.PluginManager - GC overhead limit exceeded 
java.lang.OutOfMemoryError: GC overhead limit exceeded
    at org.antlr.v4.runtime.atn.ParserATNSimulator.getEpsilonTarget(ParserATNSimulator.java:1640)
    at org.antlr.v4.runtime.atn.ParserATNSimulator.closure_(ParserATNSimulator.java:1561)
    at org.antlr.v4.runtime.atn.ParserATNSimulator.closureCheckingStopState(ParserATNSimulator.java:1535)
    at org.antlr.v4.runtime.atn.ParserATNSimulator.closure_(ParserATNSimulator.java:1603)
    at org.antlr.v4.runtime.atn.ParserATNSimulator.closureCheckingStopState(ParserATNSimulator.java:1535)
    at org.antlr.v4.runtime.atn.ParserATNSimulator.closure_(ParserATNSimulator.java:1603)
    at org.antlr.v4.runtime.atn.ParserATNSimulator.closureCheckingStopState(ParserATNSimulator.java:1535)
rohitmohan96 commented 9 years ago

I tried converting from the command line and it works. There is also some code in the file that seems to fail the conversion. If I remove that, then it seems to work when I paste.

bjansen commented 9 years ago

Yeah it works from the CLI, but it uses 1.7GB or memory, so of course it will crash in an IDE.

Possible improvement here: https://github.com/antlr/grammars-v4/issues/215