Refactorings Language

Hi,

I am trying to specify a new refactoring using the refactorings language in MPS 1.1. I saw some examples, like the Rename Method refactoring, and was trying to make something similar.

The problem is that I cannot import the jetbrains.mps.baseLanguage.refactorings language in my refactoring module. Rename Method uses the "AskExpression" concept from this language to get parameters.

Is it possible to create refactorings in 1.1 or should I wait to the next version?

Thanks!

Thiago

2 comments
Comment actions Permalink

> The problem is that I cannot import the  jetbrains.mps.baseLanguage.refactorings language in my refactoring  module.

Thiago,

This expression is in the jetbrains.mps.lang.refactoring language; the model jetbrains.mps.baseLanguage.refactorings just uses this language.

Actually, you should write refactorings only in "refactorings" model in your language. Refactoring language is imported automatically into such models (language's "refactorings" aspect), so you don't need to import it explicitly.

Good luck,

Mihail

0
Comment actions Permalink

Hi Mihail,

thanks for the answer.

The problem is that I was trying to use "ask for" directly in the refactor function, when I should actually use it in the init function.

And I also misread the Inspector, I thought it was showing the fully qualified name of the Concept, but it was showing where the concept was being used.

Thanks,

Thiago

0

Please sign in to leave a comment.