2

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

Joe
  • 4,367
  • 7
  • 33
  • 52

2 Answers2

2

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.

Marko Topolnik
  • 195,646
  • 29
  • 319
  • 436
1

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.

Community
  • 1
  • 1
MahdeTo
  • 11,034
  • 2
  • 27
  • 28