Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I reduce "uses" boilerplate for new forms?

Every time I add a new form to my project, it drops a big glop of boilerplate in the uses clause.

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs;

Seriously, who uses the Variants unit on anything resembling a regular basis? I generally end up removing Windows, Messages, Variants, Graphics and Dialogs and never missing them.

That's gotta be coming out of a template file somewhere, but I can't seem to find it. Does anyone know where I can find the template and edit it? I'm using D2009, in case it's changed recently.

like image 887
Mason Wheeler Avatar asked May 18 '09 22:05

Mason Wheeler


People also ask

How do you reduce boilerplate?

Generating Action Creators​ We recommend creating your action type constants explicitly. There are also utility libraries to aid in generating action creators, such as redux-act and redux-actions. These can help reduce boilerplate code and enforce adherence to standards such as Flux Standard Action (FSA).

Is boilerplate same as template?

To put it simply, A template provides the structure and layout for a document. A boilerplate provides actual text and images.

What does it mean when something is boilerplate?

What Is Boilerplate? The term boilerplate refers to standardized text, copy, documents, methods, or procedures that may be used over again without making major changes to the original.


1 Answers

The according resource is located in $(BDS)\bin\delphivclide*.bpl and named "VCLIDECMD"; you can extract, edit and update it with the resource editor of your choice (I recommend the one included in Pelles C).

For C++Builder users, the template file is "CPPVCLIDECMD" in bcbvclide*.bpl.

If you are using a localized version of RAD Studio, look at the appropriate language resource files (*.DE, *.FR or *.JA).

like image 140
Moritz Beutel Avatar answered Oct 07 '22 19:10

Moritz Beutel