Skip to content
Snippets Groups Projects
refactoring.html 4.38 KiB
Newer Older
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<!--    User documentation for refactoring feature. -->
	<link rel="stylesheet" type="text/css" href="../layout/stylesheet.css">
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
	<title>Refactorings in AutoFOCUS (AF3)</title>
<div class="header">
<div class="box">
<div class="navbar">
<!--a href="https://www.fortiss.org/" align="left">
<img src="fortiss-logo.png" width="90px" height="20px" align="left">
</a-->
 <div class="dropdown">
    <button class="btn" id="hamburger">
    <label for="hamburger" class="hamburger">
        <span class="hamburgerLine"></span>
        <span class="hamburgerLine"></span>
        <span class="hamburgerLine"></span>
    </label>
    </button>
    <div class="dropdown-content">  
      <a href="../getting_started.html"> Main Page</a>
      <a href="../ModandSim/model_element_attributes.html">Modeling and Simulation</a>
      <a href="../ta/technical_viewpoint.html">Deployment and Code Generation</a>
      <a href="../dse/dse_perspective.html">Design Space Exploration (DSE)</a>
      <a href="../assuranceCases/creation.html">Assurance Case Modeling</a>
      <a href=".././af3_further_resources.html">Further Resources</a>
    </div>
   </div> 
    <div class="dropdown">
    <button class="dropbtn">Modeling and Simulation <i class="triangle"></i></button>
    <div class="dropdown-content">
	   
	<a href="model_element_attributes.html">Introduction to Graphical Modeling Interface</a>
	<a href="component_architecture.html">Component Architecture Modeling</a>
    <a href="data_dictionary.html">Data Dictionary: Types and Functions</a>
    <a href="code_specification.html">Behavior Modeling -> Code Specifications</a>
	<a href="state_automaton.html">Behavior Modeling -> State Automata</a>
	<a href="hierarchical_state_automaton.html">Behavior Modeling -> Hierarchical State Automata</a>
	<a href="mode_automaton.html">Behavior Modeling -> Mode Automata</a>
	<a href="simulation_with_af3.html">Simulation -> Simulation</a>
	<a href="operatorpanels.html">Simulation -> Operator Panels</a>
	<a href="operatorpanels_advanced.html">Simulation -> Advanced Operator Panels</a>
	<a href="cosimulation_with_af3.html">Simulation -> Co-Simulation and FMI Support</a>
	<a href="model_markers_view.html">On-the-fly Checks</a>
    </div>
   </div>
<div class="topnav-right">
      <a href="mailto:af_user@lists.fortiss.org?subject=Reporting 'refactoring.html' Documentation Problem!&body= Dear Af3 team, I am reporting an issue related to 'modelling and simulation'. 
       {Please specify the problem precisely here.}.">Report a Problem?</a>
    </div>
  </div>
</head>
</div>
</div>
<div class="box">

<button onclick="topFunction()" id="upBtn" title="Go to top">Top</button>

<h2>Refactorings in AutoFOCUS (AF3)</h2>
<p>The following sections will discuss the refactoring feature of AF3</p>
<h3>Renaming</h3>
<p>AF3 offers the possibility to rename a type or a value, and to <i>propagate</i> the change to the rest of the model.
To do so, right-click on the element that you want to rename in the data dictionary, and select the "Rename refactoring..." option:</p>
<img src="./pictures/refactoring_renaming_menu.png">

<p>A dialog pops up requesting the new name:</p>

<img src="./pictures/refactoring_renaming_dialog.png">

<p> pressing "OK", occurrences of the type or value will be replaced automatically:
typically in ports in the component architecture, or in transitions of state automata.
According to the remark displayed in the dialog, notice that AF3 will do its best to find all occurrences, but it is not guaranteed that all
of these are found.</p>
<h3>Pack components</h3>
<p>The "Pack Component" feature allows the user to select several components in a component diagram editor and wrap them into a new component.
To use this feature, select a set of components (only the components: no ports or channels!), right-click, and select "Pack Component" in the context menu of the model navigator.</p>
<img src="./pictures/refactoring_packing_unpacked.png">

<p>A new component gathering all the selected components will then be created automatically by AF3.<br> 
<b><u>Note:</u></b> however that the position and size of the new component need to be adjusted manually.</p>
<img src="./pictures/refactoring_packing_packed.png">
<script src="../layout/jsscript/topBtn.js">
</script>