User Dialogs for KSBasE

The user dialogs extension library provides functions that allow to create interactive transformations.

Warning: The functions will block on the dialog. So do not use them in a headless transformation where no User input is expected.

Usage Example

Add a dependency to de.cau.cs.kieler.ksbase in your ksbase plugin (however, should already be there).

extension de::cau::cs::kieler::ksbase::util::userdialogs;

Void doSomething():
  let userString  = getStringFromUser("Renaming Signal or Variable","A"):
  let usert     = gettFromUser("Enter Integer please!",5):
  let userFloat   = getRealFromUser("Enter Float please!",5.3):
  let userBool    = getBooleanFromUser("Enter Boolean please!"):
  info(userString + usert + userFloat + userBool ) // requires the xtend stdlib "io"
;

For more documentation see the library source:

Problems

  • Sometimes the Xtend editor shows error messages ("extension cannot be found" or alike) that actually are not true. Before tearing your hair, better try the transformation in the real application. Usually it works there.

Example String Dialog

stringdialog.png

Tags: