Skip to main content

rename_element

Function rename_element 

Source
pub fn rename_element(
    input: &Path,
    target: &str,
    new_name: &str,
    verbose: bool,
) -> Result<RenameResult, String>
Expand description

Rename an element in a SysML file and output the modified text.

Uses AnalysisHost::apply_model_edit() to perform the rename via the semantic Model layer, with automatic text re-rendering and SymbolIndex sync.

ยงArguments

  • input - Path to a .sysml file
  • target - Name or qualified name of the element to rename
  • new_name - The new name for the element
  • verbose - Enable verbose output