anchor.diff:  var
     idx: integer;
   begin
  -  idx := tfhirexamplescenario(resource).instanceList.IndexOf(tfhirexamplescenarioInstance(TVStructure.Selected.TagObject));
  -  if idx > 0 then begin
  -  tfhirexamplescenario(resource).instanceList.Exchange(idx, idx - 1);
  -  tvStructure.Selected.Index := tvStructure.Selected.Index - 1;
  -  ResourceIsDirty := true;
  +  idx := tfhirexamplescenario(resource).instanceList.IndexOf(tfhirexamplescenarioinstance(tvStructure.Selected.tagObject));
  +  if idx > 0 then
  +  begin
  +    tfhirexamplescenario(resource).instanceList.Exchange(idx, idx - 1);
  +    tvStructure.Selected.Index := tvStructure.Selected.Index - 1;
  +    ResourceIsDirty := true;
     end;
     ReloadTreeview(tvStructure.Selected);
   end;
  
positive.code:   if obj is tfhirexamplescenarioProcessStep then
    begin
      TabControl2.tabindex := 5;
      if tfhirexamplescenarioProcessStep(TVStructure.Selected.TagObject).pause then
      chkPause.ischecked:= true else chkPause.ischecked:= false;
    end;
    if obj is tfhirexamplescenarioProcessStepAlternative then
    begin
  
negative.code: var
    idx: integer;
  begin
    idx := tfhirexamplescenarioProcessStepAlternative(tvStructure.Selected.ParentItem.tagObject).stepList.IndexOf(tfhirexamplescenarioProcessStep(tvStructure.Selected.tagObject));
    if idx < tfhirexamplescenarioProcessStepAlternative(tvStructure.Selected.ParentItem.tagObject).stepList.Count - 1 then
    begin
      tfhirexamplescenarioProcessStepAlternative(tvStructure.Selected.ParentItem.tagObject).stepList.Exchange(idx, idx + 1);
      tvStructure.Selected.Index := tvStructure.Selected.Index + 1;
      ResourceIsDirty := true;
    end;
    ReloadTreeview(tvStructure.Selected);
  end;
  
  procedure TExampleScenarioEditorFrame.btnOptionUpClick(Sender: TObject);
  var
    idx: integer;
  begin
  
    idx := tfhirexamplescenarioProcessStepAlternative(tvStructure.Selected.ParentItem.tagObject).stepList.IndexOf(tfhirexamplescenarioProcessStep(tvStructure.Selected.tagObject));
    if idx > 0 then
    begin
      tfhirexamplescenarioProcessStepAlternative(tvStructure.Selected.ParentItem.tagObject).stepList.Exchange(idx, idx - 1);
      tvStructure.Selected.Index := tvStructure.Selected.Index - 1;
      ResourceIsDirty := true;
    end;
    ReloadTreeview(tvStructure.Selected);
  end;
  