Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2017-03

JCF not formatting uses clause

2 messages · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi

I have the following unit. No matter what I try, I can't get JCF to correct the indentation of the uses clause shown below. Anybody know what setting I need to change - or is this not supported in Lazarus's JCF?

This seems like a bug in JCF (include with Lazarus), because I can run the original jcfGui.exe binary from the original JCF project on SourceForge, and it correctly formats the below code, and aligns the uses clause lines.

========================
unit createpicscomponent;
{$mode objfpc}{$H+}
interface

uses
Classes,
SysUtils,
math,

        FPG;
type
  TCreatePicsComponent = class(TComponent)
  end;
implementation
end.
========================

Attached is my JCF config file in that might help.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp -------------- next part -------------- A non-text attachment was scrubbed... Name: jcfconfig.tar.gz Type: application/x-gzip Size: 3370 bytes Desc: not available URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20170313/67a1e66d/attachment.bin>

Reply by email

Graeme Geldenhuys
to Graeme Geldenhuys
Graeme Geldenhuys wrote
This seems like a bug in JCF (include with Lazarus), because I can run the original jcfGui.exe binary from the original JCF project on SourceForge, and it correctly formats the below code, and aligns the uses clause lines.

Solved it. It seems I kept looking in the wrong place (Indentation or Alignment settings).

This time I did a screen-by-screen comparison between Lazarus JCF settings and the original jcfGUI.exe settings from SourceForge.

The magic settings is under "Clarify -> Line Breaking -> Returns" and then you must tick the "One uses clause per line" checkbox. Without this, indentation and alignment of uses clauses don't take affect at all. :-/

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email