Refactoring Jar

Hi.  I remember a while ago looking at the jars IntelliJ used.  One of them was used to do it's java parsing for what I assumed was for the puposes of refactoring.  What was that jar?  I looked through the latest libraries, but none of them seem to match that.  Thanks!

0
4 comments

Hello mark,

Hi. I remember a while ago looking at the jars IntelliJ used. One of
them was used to do it's java parsing for what I assumed was for the
puposes of refactoring. What was that jar? I looked through the
latest libraries, but none of them seem to match that. Thanks!


There is no such jar. IDEA's Java parsing is part of its core functionality
and cannot be reused outside of IDEA itself.

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Avatar
Permanently deleted user

On 12/16/2008 10:29 AM, Dmitry Jemerov wrote:

Hello mark,

>
>> Hi. I remember a while ago looking at the jars IntelliJ used. One of
>> them was used to do it's java parsing for what I assumed was for the
>> puposes of refactoring. What was that jar? I looked through the
>> latest libraries, but none of them seem to match that. Thanks!
>

There is no such jar. IDEA's Java parsing is part of its core
functionality and cannot be reused outside of IDEA itself.

>

try antlr -- nice tool although not trivial

0
Avatar
Permanently deleted user

Mark,

I've used ANTLR and JavaCC, though not for anything as complicated as a Java parser, but they're both up to the task. And they both have sample Java 5 grammars you can use as a starting point.

However, if your need is for something to use in an interactive context the way IDEA does, these may not be the best choice, since I don't think they handle incremental parsing, and if you have to re-parse an entire file up every change (at whatever level of granularity you define, be it in terms of how much text changed or how much time has passed since the user stopped typing) I don't think a full re-parse is going to be feasible. Error recovery (so you can continue parsing past the point of any detected syntax error) is also complicated in these parser generators and that adds to the challenge of using them in an interactive context.


Randall Schulz

0
Avatar
Permanently deleted user

Thank you!  I don't know why I thought that was the case, but you are correct.  Right before you guys answered I grabbed some of the older versions and sure enough, there was nothing.  Sorry if I wasted your time.  I'll take a look at antlr and see if it meets my needs.  Thanks again.

0

Please sign in to leave a comment.