Recent

Author Topic: Project inspector upper and lower case  (Read 3008 times)

440bx

  • Hero Member
  • *****
  • Posts: 3946
Project inspector upper and lower case
« on: July 28, 2018, 06:32:02 pm »
Hello,

The project inspector lists all the units my program is using entirely in lowercase. 

I name my units using "camel case", for instance "UnitToDoThisOrThat" and the project inspector shows it "unittodothisorthat" which makes it difficult to read and locate a unit of interest.

Is there a way I can tell the project inspector to use the name with the original character casing ?

Also, Lazarus is saving all the unit names using all lowercase even when I give a "camel case" name.  Is there a way to tell Lazarus to use the "camel case" name as it was originally typed ?

Thank you for your help.

PS: Windows 7 64bit, FPC 3.0.4, Lazarus 1.8.2
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: Project inspector upper and lower case
« Reply #1 on: July 28, 2018, 07:06:56 pm »
In the IDE Options dialog under Environment select the Naming page, and in the "Save As - auto rename Pascal file lower case" radiogroup select "No automatic renaming"
When you do this the Project Inspector shows the actual file names faithfully (at least on Linux).
Note that when you do this you are working against the sensible default that Lazarus applies, and sharing your projects with others may run into cross-platform problems that would be avoided by sticking with the default setting.
« Last Edit: July 28, 2018, 07:10:18 pm by howardpc »

440bx

  • Hero Member
  • *****
  • Posts: 3946
Re: Project inspector upper and lower case
« Reply #2 on: July 28, 2018, 07:23:10 pm »
In the IDE Options dialog under Environment select the Naming page, and in the "Save As - auto rename Pascal file lower case" radiogroup select "No automatic renaming"
When you do this the Project Inspector shows the actual file names faithfully (at least on Linux).
Note that when you do this you are working against the sensible default that Lazarus applies, and sharing your projects with others may run into cross-platform problems that would be avoided by sticking with the default setting.

Thank worked like a charm, thank you!.  :)
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

wp

  • Hero Member
  • *****
  • Posts: 11858
Re: Project inspector upper and lower case
« Reply #3 on: July 28, 2018, 07:31:52 pm »
In the IDE Options dialog under Environment select the Naming page, and in the "Save As - auto rename Pascal file lower case" radiogroup select "No automatic renaming"
When you do this the Project Inspector shows the actual file names faithfully (at least on Linux).
Note that when you do this you are working against the sensible default that Lazarus applies, and sharing your projects with others may run into cross-platform problems that would be avoided by sticking with the default setting.
It would be better if the Project Inspector had an option to display the unit names instead of the file names for exactly this reason. The project file lpi, as well as package file lpk, does contain entries with both unit (CaMeL-case) and file names (lower-case), so I think it should not be too difficult to write such a patch.

Code: XML  [Select][+][-]
  1.       <Unit1>
  2.         <Filename Value="unit1.pas"/>                                
  3.         <IsPartOfProject Value="True"/>
  4.         <ComponentName Value="Form1"/>
  5.         <HasResources Value="True"/>
  6.         <ResourceBaseClass Value="Form"/>
  7.         <UnitName Value="Unit1"/>
  8.       </Unit1>

440bx

  • Hero Member
  • *****
  • Posts: 3946
Re: Project inspector upper and lower case
« Reply #4 on: July 28, 2018, 07:40:25 pm »
It would be better if the Project Inspector had an option to display the unit names instead of the file names for exactly this reason.

I concur wholeheartedly.  The editor displays the unit names in CaMel case.  The project inspector should simply do the same the editor is doing.  That would add consistency (polish to an already nice environment) too.

Cheers.
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

 

TinyPortal © 2005-2018