@@ -76,6 +76,17 @@ interface
7676 property TruncateSourceComments: Boolean
7777 read GetTruncateSourceComments write SetTruncateSourceComments;
7878
79+ // / <summary>Gets flag that determines whether source code comments are
80+ // / repeated in a generated unit's implementation section.</summary>
81+ function GetCommentsInUnitImpl : Boolean;
82+ // / <summary>Sets flag that determines whether source code comments are
83+ // / repeated in a generated unit's implementation section.</summary>
84+ procedure SetCommentsInUnitImpl (const Value : Boolean);
85+ // / <summary>Flag deteminining whether source code comments are repeated in
86+ // / a generated unit's implementation section.</summary>
87+ property CommentsInUnitImpl: Boolean
88+ read GetCommentsInUnitImpl write SetCommentsInUnitImpl;
89+
7990 // / <summary>Gets current default file extension / type used when writing
8091 // / code snippets to file.</summary>
8192 function GetSourceDefaultFileType : TSourceFileType;
@@ -326,6 +337,9 @@ TPreferences = class(TInterfacedObject,
326337 // / <summary>Flag determining whether multi-paragraph source code is
327338 // / truncated to first paragraph in source code comments.</summary>
328339 fTruncateSourceComments: Boolean;
340+ // / <summary>Flag deteminining whether source code comments are repeated
341+ // / in a generated unit's implementation section.</summary>
342+ fCommentsInUnitImpl: Boolean;
329343 // / <summary>Indicates whether generated source is highlighted by
330344 // / default.</summary>
331345 fSourceSyntaxHilited: Boolean;
@@ -426,6 +440,16 @@ TPreferences = class(TInterfacedObject,
426440 // / <remarks>Method of IPreferences.</remarks>
427441 procedure SetTruncateSourceComments (const Value : Boolean);
428442
443+ // / <summary>Gets flag that determines whether source code comments are
444+ // / repeated in a generated unit's implementation section.</summary>
445+ // / <remarks>Method of IPreferences.</remarks>
446+ function GetCommentsInUnitImpl : Boolean;
447+
448+ // / <summary>Sets flag that determines whether source code comments are
449+ // / repeated in a generated unit's implementation section.</summary>
450+ // / <remarks>Method of IPreferences.</remarks>
451+ procedure SetCommentsInUnitImpl (const Value : Boolean);
452+
429453 // / <summary>Gets current default file extension / type used when writing
430454 // / code snippets to file.</summary>
431455 // / <remarks>Method of IPreferences.</remarks>
@@ -690,6 +714,7 @@ procedure TPreferences.Assign(const Src: IInterface);
690714 Self.fSourceDefaultFileType := SrcPref.SourceDefaultFileType;
691715 Self.fSourceCommentStyle := SrcPref.SourceCommentStyle;
692716 Self.fTruncateSourceComments := SrcPref.TruncateSourceComments;
717+ Self.fCommentsInUnitImpl := SrcPref.CommentsInUnitImpl;
693718 Self.fSourceSyntaxHilited := SrcPref.SourceSyntaxHilited;
694719 Self.fMeasurementUnits := SrcPref.MeasurementUnits;
695720 Self.fOverviewStartState := SrcPref.OverviewStartState;
@@ -741,6 +766,11 @@ destructor TPreferences.Destroy;
741766 inherited ;
742767end ;
743768
769+ function TPreferences.GetCommentsInUnitImpl : Boolean;
770+ begin
771+ Result := fCommentsInUnitImpl;
772+ end ;
773+
744774function TPreferences.GetCustomHiliteColours : IStringList;
745775begin
746776 Result := fHiliteCustomColours;
@@ -852,6 +882,11 @@ function TPreferences.GetWarnings: IWarnings;
852882 Result := fWarnings;
853883end ;
854884
885+ procedure TPreferences.SetCommentsInUnitImpl (const Value : Boolean);
886+ begin
887+ fCommentsInUnitImpl := Value ;
888+ end ;
889+
855890procedure TPreferences.SetCustomHiliteColours (const Colours: IStringList);
856891begin
857892 fHiliteCustomColours := Colours;
@@ -985,6 +1020,7 @@ function TPreferencesPersist.Clone: IInterface;
9851020 NewPref.SourceDefaultFileType := Self.fSourceDefaultFileType;
9861021 NewPref.SourceCommentStyle := Self.fSourceCommentStyle;
9871022 NewPref.TruncateSourceComments := Self.fTruncateSourceComments;
1023+ NewPref.CommentsInUnitImpl := Self.fCommentsInUnitImpl;
9881024 NewPref.SourceSyntaxHilited := Self.fSourceSyntaxHilited;
9891025 NewPref.MeasurementUnits := Self.fMeasurementUnits;
9901026 NewPref.OverviewStartState := Self.fOverviewStartState;
@@ -1069,6 +1105,7 @@ constructor TPreferencesPersist.Create;
10691105 Storage.GetInteger(' CommentStyle' , Ord(csAfter))
10701106 );
10711107 fTruncateSourceComments := Storage.GetBoolean(' TruncateComments' , False);
1108+ fCommentsInUnitImpl := Storage.GetBoolean(' UseCommentsInUnitImpl' , True);
10721109 fSourceSyntaxHilited := Storage.GetBoolean(' UseSyntaxHiliting' , False);
10731110
10741111 // Read printing section
@@ -1151,6 +1188,7 @@ destructor TPreferencesPersist.Destroy;
11511188 Storage.SetInteger(' FileType' , Ord(fSourceDefaultFileType));
11521189 Storage.SetInteger(' CommentStyle' , Ord(fSourceCommentStyle));
11531190 Storage.SetBoolean(' TruncateComments' , fTruncateSourceComments);
1191+ Storage.SetBoolean(' UseCommentsInUnitImpl' , fCommentsInUnitImpl);
11541192 Storage.SetBoolean(' UseSyntaxHiliting' , fSourceSyntaxHilited);
11551193 Storage.Save;
11561194
0 commit comments