anchor.diff:    begin
       Name := 'mnuFile';
       SetPosition(476, 61, 172, 20);
  -    AddMenuItem('New...', rsKeyCtrl+'N', nil).Enabled := False;
  +    miFile := AddMenuItem('New...', rsKeyCtrl+'N', @miFileNewUnit);
       AddMenuItem('-', '', nil);
       AddMenuItem('Open...', rsKeyCtrl+'O', @btnOpenFileClicked);
       AddMenuItem('Open Recent', '', nil).Enabled := False;
  
positive.code:     btnTest: TfpgButton;
      {$endif}
      pmOpenRecentMenu: TfpgPopupMenu;
      miRecentProjects: TfpgMenuItem;
      FRecentFiles: TfpgMRU;
      FRegex: TRegExpr;
  
negative.code:   end;
  end;
  
  procedure TMainForm.miFileNewUnit(Sender: TObject);
  var
    newunit: TfpgString;
    sl: TStringList;
    FInternalMacroList: TIDEMacroList;
    i: integer;
  begin
    if fpgInputQuery('New Unit', 'Please give the new unit a file name', newunit) then
    begin
      if GProject.UnitList.FileExists(newunit) then
      begin
        ShowMessage(Format('The unit <%s> already exists in the project', [newunit]));
        Exit;
      end;
      sl := TStringList.Create;
      try
        sl.LoadFromFile(GMacroList.ExpandMacro('${TEMPLATEDIR}default/unit.pas'));
        sl.Text := StringReplace(sl.Text, '${UNITNAME}', fpgChangeFileExt(fpgExtractFileName(newunit), ''), [rfReplaceAll, rfIgnoreCase]);
        sl.SaveToFile(GProject.ProjectDir + newunit);
      finally
        sl.Free;
      end;
  //    AddUnitToProject(newunit);
  
      OpenEditorPage(newunit);
    end;
  end;
  
  procedure TMainForm.miFileSave(Sender: TObject);
  var
    s: TfpgString;
  