; -------------------------------------------------------------------------------- ; @Title: Beautify an existing PRACTICE script ; @Description: ; Beautifies the script, fixing the CamelCasing and indentation. ; @Keywords: PRACTICE, EDIT.FORMAT, CamelCasing, indent, beautify ; @Author: MOB ; @Copyright: (C) 1989-2020 Lauterbach GmbH, licensed for use with TRACE32(R) only ; -------------------------------------------------------------------------------- ; $Id: beautify.cmm 19661 2022-07-29 15:43:03Z rweiss $ PARAMETERS &script IF "&script"=="" ( DIALOG.File.open *.cmm ENTRY %LINE &script ) IF FILE.EXIST("&script") ( ECHO %COLOR.GRAY "beautifying: &script" SETUP.EDITOR.TYPE PowerView ; required for EDIT.FORMAT PEDIT "&script" EDIT.FORMAT /Beautify EDIT.SAVE "&script" EDIT.CLOSE "&script" ECHO %COLOR.GREEN "beautified: &script" ) ELSE ( ECHO %ERROR "Error: no such file: &script" ) ENDDO