Recent

Author Topic: [Solved] JEDI Code Format - problem  (Read 1120 times)

bobonwhidbey

  • Hero Member
  • *****
  • Posts: 630
    • Double Dummy Solver - free download
[Solved] JEDI Code Format - problem
« on: September 06, 2023, 12:33:41 am »
I need help with the JEDI Code Format feature. After using the format feature (Ctrl-D) simple code looks like this, with the // test comment shown on it's own line.

Code: Pascal  [Select][+][-]
  1. procedure TForm1.FormShow(Sender: TObject);
  2. var
  3.   i: integer;
  4.  
  5.   procedure test;
  6.   begin
  7.     i := 1;
  8.   end;
  9.   // test
  10. begin   // Form Show
  11.   Test;
  12. end;  
  13.  

I want the test comment to look like this:
Code: Pascal  [Select][+][-]
  1.  
  2.   procedure test;
  3.   begin
  4.     i := 1;
  5.   end;  // test
  6.  
  7.  

I think this problem only occurs when I have a comment on the end statement of an embedded procedure or function. And it only happens on the last embedded procedure or function. Thus, only on the embedded end statement just before the begin statement.

What can I do to the JCF Format Settings to fix this so that the comment stays on the same line as that end statement?
« Last Edit: September 06, 2023, 05:25:43 pm by bobonwhidbey »
Lazarus 3.8 FPC 3.2.2 x86_64-win64-win32/win64

Thaddy

  • Hero Member
  • *****
  • Posts: 18728
  • To Europe: simply sell USA bonds: dollar collapses
Re: JEDI Code Format - problem
« Reply #1 on: September 06, 2023, 08:57:56 am »
You can't. You need to modify the JCF code for that.
If Europe sells their USA bonds the USD will collapse. Europe can affort that given average state debts. The USA can't affort that. Just an advice...

BrunoK

  • Hero Member
  • *****
  • Posts: 765
  • Retired programmer
Re: JEDI Code Format - problem
« Reply #2 on: September 06, 2023, 11:31:22 am »
I need help with the JEDI Code Format feature. After using the format feature (Ctrl-D) simple code looks like this, with the // test comment shown on it's own line.

What can I do to the JCF Format Settings to fix this so that the comment stays on the same line as that end statement?
IDE_Menu_Source->JEDI Code Format->Format Settings->Line Breaking->Returns : uncheck In misc. good places.

bobonwhidbey

  • Hero Member
  • *****
  • Posts: 630
    • Double Dummy Solver - free download
Re: [Solved] JEDI Code Format - problem
« Reply #3 on: September 06, 2023, 05:26:22 pm »
Thank you Bruno, that's just what I was looking for.
Lazarus 3.8 FPC 3.2.2 x86_64-win64-win32/win64

DomingoGP

  • Full Member
  • ***
  • Posts: 113
Re: [Solved] JEDI Code Format - problem
« Reply #4 on: September 10, 2023, 04:38:44 pm »
This was a bug in JCF, solved in main and fixes_3_0 branches.

 

TinyPortal © 2005-2018