Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

New line in help insight

With tooltip help insight I can display some extra comments when hovering over a classname/fieldname/procedurename etc. like this:

/// <comments>Some comments on e.g. a class.</comments>

How can I force a new line in the text shown?

like image 960
Jan de Jonge Avatar asked Dec 05 '25 17:12

Jan de Jonge


1 Answers

In XE7 and XE8 the following

  public
    { Public declarations }
    /// <comments>Some comments<para/>comments on a second line</comments>
    procedure SetUp;

puts the text 'comments on a second line' on a new line in the Help Insight pop-up. A minor quirk is the second line is indented a couple of spaces, but if I do

/// <comments>Some comments<para>comments on a second line</para>third line</comments>

the 'third line' isn't indented. The indentation inconsistency can by masked (at the expense of indenting everything by two spaces) by doing:

///<comments><para>Some comments</para><para>comments on a second line</para><para>third</para></comments>
procedure SetUp;

Judging by experiments, the

<p/>

XML tag used to work in XE4, but stopped working by XE7, as in my initial test:

  TForm1 = class(TForm)
    CDS: TClientDataSet;
    DataSource1: TDataSource;
    DBGrid1: TDBGrid;
    Button1: TButton;
    procedure CDSCalcFields(DataSet: TDataSet);
    procedure FormCreate(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    ///<comments>Some comments<p/>more</comments>
    procedure AddHLIndex;

In XE4 the above displays the 'more' on a new line in XE4 but on the same line as 'Some comments' in XE8.

I wondered whether the difference in XE8 was anything to do with the presence of Castalia, but I get the same difference between XE4 and XE8 with XE8 started with the /NOCASTALIA switch.

I haven't tested exhaustively but XE8 ignores all the 'HTML' formatting tags I've tried (except the

<c>

tag mentioned by the questioner), which might be the result of a deliberate change or an accident, of course. On the other hand, it does seem to process HTML escapes such as

&gt;

and

&lt;

but not, unfortunately,

&#10;

, which it just ignores.

like image 141
MartynA Avatar answered Dec 08 '25 20:12

MartynA