Joe
Joe

Reputation: 4514

Eclipse refactorings - only Java

I'm doing some plugin developement in Eclipse - and I'm considering building in some refactoring tools for a domain-specific language that is part of the plugin process. However from looking at various tutorials and the like I'm starting to suspect that Eclipse only provides refactoring support for Java - can someone confirm this for me? I'd quite like not have rolled my own and then found that there was a handy API I'd not found…

Joe

Upvotes: 2

Views: 124

Answers (2)

MahdeTo
MahdeTo

Reputation: 11194

This could be done through AST manipulation using Eclipse LTK http://www.eclipse.org/articles/Article-LTK/ltk.html . Though Java's AST is not so simple, your own DSL's AST is definitely going to be easier. I've undergone a similar exercise and found the resources provided in the following answer very helpful: https://stackoverflow.com/a/1315990/90313

Goodluck.

Upvotes: 1

Marko Topolnik
Marko Topolnik

Reputation: 200296

The refactoring tasks are relying on the Java AST model that Eclipse makes available. You would first have to make your own AST builder. It's a LOT of work for Java, which itself is a relatively simple language.

Upvotes: 2

Related Questions