Child pages
  • What's new in MPS 2.5 M1

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


For some types of dependencies it is possible to show usages or safe delete with popup menu. For "depends on" (dependency without re-export) Dependencies Analyzer will be invoked on Show Usages.

Changes in Refactoring language

UI for getting refactoring parameters now is removed from refactoring language. Now choosers for parameters are not called, it is not allowed to show UI in init (e.g. ask and ask boolean), keystroke has no effect. All this functionality should be moved to an action correspondent to the refactoring.

The following constructs added to the refactoring language:

  • is applicable refactoring<Refactoring>(target)
    returns true if refactoring target corresponds to the current target (type, single/multiple) and applicable as in refactoring isApplicable method, and there is no refactoring that overrides current refactoring for this target.
  • execute refactoring<Refactoring>(target : project, parameters );
    executes refactoring for target with parameters
  • create refcontext<Refactoring>(target : project, parameters )
    create refactoring context for refactoring, target and fill parameters in context, this context then can be used for refactoring execution or for further work with parameters; UI is not shown during this call

It is necessary to manually migrate user refactorings. Migration consists of

  • create action for refactoring
  • copy caption, create context parameters
  • add refactoring keystroke with the newly created action to KeymapChangesDeclaration
  • create ActionGroupDeclaration for refactoring that modifies jetbrains.mps.ide.actions.NodeRefactoring action group at default position
  • add isApplicable clause to the action created; usually it is just us applicable refactoring< >() call
  • add execute clause to the action created; all the parameter preparations that were in init of refactoring should be moved here; at the end it is necessary to execute refacoring with prepared parameters (with execute refactoring< >(); statement)
  • remove all parameter preparation from init of refactoring, they should be ready on entry to init; you can still validate parameters and return false if validation fails