Christoph Walesch
Christoph Walesch

Reputation: 2427

How can I Import Java Code into MPS-BaseLang?

I'd like to import existing Java code (say, an Eclipse project) into MPS. The code should be parsed into MPS' BaseLang, so that I can analyze and transform it.

How can I do that?

Upvotes: 0

Views: 240

Answers (2)

Eugen Schindler
Eugen Schindler

Reputation: 351

You can also copy some java code into the buffer, right click on a spot in a function or in a class and then choose "Paste as Java Class Content" to import java code.

Upvotes: 1

Sergej Koščejev
Sergej Koščejev

Reputation: 790

Right-click on a model and choose "Get Model Contents From Source". This should run the MPS-to-Java importer. Untested, though.

Upvotes: 2

Related Questions