anchor.diff:      fRunProc: TCheckedAsyncProcess;
   
       fLogMessager: TCELogMessageSubject;
  +    fMainMenuSubj: TCEMainMenuSubject;
  +    procedure updateMainMenuProviders;
   
       // ICEMultiDocObserver
       procedure docNew(aDoc: TCESynMemo);
  
positive.code:   FreeRunnableProc;
    //
    fLogMessager.Free;
    EntitiesConnector.removeObserver(self);
    inherited;
  end;
  
negative.code:       actProjRunWithArgs.Enabled := fProject.canBeRun;
      end;
      actFileAddToProj.Enabled := hasEd and hasProj;
      //
      updateMainMenuProviders;
    finally
      Dec(fUpdateCount);
    end;
  end;
  
  procedure TCEMainForm.updateMainMenuProviders;
  var
    i, j: Integer;
    itm: TMenuItem;
    doneUpdate: boolean;
  begin
    doneUpdate := false;
    for j := 0 to fMainMenuSubj.observersCount-1 do
    begin
      // try to update existing entry.
      for i := 0 to mainMenu.Items.Count-1 do
        if PtrInt(fMainMenuSubj.observers[j]) = mainMenu.Items[i].Tag then
        begin
          (fMainMenuSubj.observers[j] as ICEMainMenuProvider).menuUpdate(mainMenu.Items[i]);
          doneUpdate := true;
          break;
        end;
      if doneUpdate then
        continue;
      // otherwise propose to create a new entry
      itm := TMenuItem.Create(Self);
      (fMainMenuSubj.observers[j] as ICEMainMenuProvider).menuDeclare(itm);
      itm.Tag:= PtrInt(fMainMenuSubj.observers[j]);
      case itm.Count > 0 of
        true: mainMenu.Items.Add(itm);
        false: itm.Free;
      end;
    end;
  end;
  
  