Sign in Join
Wiki copytemporary

Cody: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
1-"Cody" is a Lazarus design time package extending the IDE with some advanced code tools for power users. It is located in the Lazarus sources components/codetools/ide/cody.lpk since Lazarus 0.9.31.
1+"Cody" is a Lazarus design time package extending the IDE with some advanced code tools for power users. It is located in the Lazarus sources components/codetools/ide/cody.lpk since Lazarus 0.9.31.
22
3+## Contents
4+
5+ * 1 Overview
6+ * 2 PPU files of project
7+ * 2.1 Units
8+ * 2.2 Linked Files
9+ * 3 Insert file at cursor
10+ * 4 Insert call inherited
11+ * 5 Add Assign method
12+ * 6 Explode a "With" block
13+ * 7 Add a "With" block
14+ * 8 Declare Variable
15+ * 8.1 Features
16+ * 9 Unit / Identifier Dictionary
17+ * 10 Creating a new dockable IDE Window
18+ * 11 See also
19+
320# Overview
421
5-Cody adds the following items to the IDE:
22+Cody adds the following items to the IDE:
623
7-- PPU files of project - a dialog showing stats about all used ppu files
8-- Insert file at cursor - a dialog to select a file to replace the current selection
9-- Add call inherited - adds a statement "inherited FunctionName(params);"
10-- Add Assign method - a dialog to add an Assign method to a class
11-- Explode a "With" block - removes a "With" block and fixes all identifiers
12-- Add a "With" block - add a "With" block and remove identifiers
13-- Declare Variable - dialog to declare a new variable
14-- Unit / Identifier Dictionary - Database of all identifiers the IDE has seen
24+ * PPU files of project \- a dialog showing stats about all used ppu files
25+ * Insert file at cursor \- a dialog to select a file to replace the current selection
26+ * Add call inherited \- adds a statement "inherited FunctionName(params);"
27+ * Add Assign method \- a dialog to add an Assign method to a class
28+ * Explode a "With" block \- removes a "With" block and fixes all identifiers
29+ * Add a "With" block \- add a "With" block and remove identifiers
30+ * Declare Variable \- dialog to declare a new variable
31+ * Unit / Identifier Dictionary \- Database of all identifiers the IDE has seen
1532
1633# PPU files of project
1734
18-- Menu item: Project / Show ppu files of project
19-- Requires: A compiled project
20-- Key name: *Show used .ppu files ...* (in the IDE under options Editor / Key mapping)
35+ * Menu item: Project / Show ppu files of project
36+ * Requires: A compiled project
37+ * Key name: _Show used .ppu files ..._ (in the IDE under options Editor / Key mapping)
2138
22-This dialog provides statistics about all the current project's used .ppu and .o files.
39+This dialog provides statistics about all the current project's used .ppu and .o files.
2340
24-**Note:** The codetools will try to parse all used .ppu files. The codetools uses its own ppu parser (not the compiler's parser). The advantage of this is that codetools can read many different versions of ppu. The drawback is that it might not be able to read the very latest version. Cody uses the sources as fallback.
41+**Note:** The codetools will try to parse all used .ppu files. The codetools uses its own ppu parser (not the compiler's parser). The advantage of this is that codetools can read many different versions of ppu. The drawback is that it might not be able to read the very latest version. Cody uses the sources as fallback.
2542
2643## Units
2744
28-The first page **Units** shows which unit uses what other units, and where they are used. Note: If a .ppu file cannot be parsed the source (.pas, .pp) will be parsed instead of the .ppu.
45+The first page **Units** shows which unit uses what other units, and where they are used. Note: If a .ppu file cannot be parsed the source (.pas, .pp) will be parsed instead of the .ppu.
2946
30-<figure>
31-<img src="Cody_ppu_files2.png" title="Cody_ppu_files2.png" />
32-<figcaption>Cody_ppu_files2.png</figcaption>
33-</figure>
47+[![Cody ppu files2.png](/wiki-images/3/3f/Cody_ppu_files2.png)](</File:Cody_ppu_files2.png>)
3448
35-You can sort the list by double-clicking on a column header.
49+You can sort the list by double-clicking on a column header.
3650
37-- General
38- - Source: the full file name of the unit source file
39- - PPU: the full file name of the unit ppu file.
40-- Uses: This lists all units used by that unit.
41-- Used by: This lists all units that use the current unit directly.
42-- Uses path: This gives one path from the project main source to the unit. This is not necessarily the shortest path.
51+ * General
52+ * Source: the full file name of the unit source file
53+ * PPU: the full file name of the unit ppu file.
54+ * Uses: This lists all units used by that unit.
55+ * Used by: This lists all units that use the current unit directly.
56+ * Uses path: This gives one path from the project main source to the unit. This is not necessarily the shortest path.
4357
4458## Linked Files
4559
46-The second page **Linked Files** shows what files, libraries and frameworks are used by the project and what unit links them in.
60+The second page **Linked Files** shows what files, libraries and frameworks are used by the project and what unit links them in.
4761
48-<figure>
49-<img src="Cody_ppu_linked_files1.png" title="Cody_ppu_linked_files1.png" />
50-<figcaption>Cody_ppu_linked_files1.png</figcaption>
51-</figure>
62+[![Cody ppu linked files1.png](/wiki-images/d/d3/Cody_ppu_linked_files1.png)](</File:Cody_ppu_linked_files1.png>)
5263
53-- **Hint:** Double click on an unit to jump to the unit on the *Units* page.
54-- **Note:** If a .ppu file cannot be parsed, there is no fallback. There will be no information displayed about that unit's linked files.
64+ * **Hint:** Double click on an unit to jump to the unit on the _Units_ page.
65+ * **Note:** If a .ppu file cannot be parsed, there is no fallback. There will be no information displayed about that unit's linked files.
5566
5667# Insert file at cursor
5768
58-- Requires: a file in the source editor
59-- Menu item: Source Editor / popup / Source / Insert file at cursor ...
60-- Shortcut name: *Insert file at cursor* (in the IDE under options Editor / Key mapping)
69+ * Requires: a file in the source editor
70+ * Menu item: Source Editor / popup / Source / Insert file at cursor ...
71+ * Shortcut name: _Insert file at cursor_ (in the IDE under options Editor / Key mapping)
6172
62-This opens a file dialog. Select a file, which will be inserted at the current source editor position. If some text was selected, it will be replaced.
73+This opens a file dialog. Select a file, which will be inserted at the current source editor position. If some text was selected, it will be replaced.
6374
6475# Insert call inherited
6576
66-- Requires: cursor in a method implementation
67-- Menu item: Source Editor / popup / Source / Add call inherited
68-- Shortcut name: *Insert call inherited* (in the IDE under options Editor / Key mapping)
69-
70-This adds a call to the inherited method with all parameters. For example:
77+ * Requires: cursor in a method implementation
78+ * Menu item: Source Editor / popup / Source / Add call inherited
79+ * Shortcut name: _Insert call inherited_ (in the IDE under options Editor / Key mapping)
7180
72-``` pascal
81+This adds a call to the inherited method with all parameters. For example:
82+```
7383type
74- TMyClass = class(TComponent)
75- public
76- constructor Create(AOwner: TComponent); override;
77- end;
78-
79-constructor TMyClass.Create(AOwner: TComponent);
80-begin
81- |
82-end;
84+ TMyClass = class(TComponent)
85+ public
86+ constructor Create(AOwner: TComponent); override;
87+ end;
88+
89+ constructor TMyClass.Create(AOwner: TComponent);
90+ begin
91+ |
92+ end;
8393```
8494
85-This will add *inherited Create(AOwner);*:
86-
87-``` pascal
95+This will add _inherited Create(AOwner);_ :
96+```
8897constructor TMyClass.Create(AOwner: TComponent);
89-begin
90- inherited Create(AOwner);
91-end;
98+ begin
99+ inherited Create(AOwner);
100+ end;
92101```
93102
94-If the method is a function and the current line is empty it will prepend a *Result:=*.
95-
96-``` pascal
103+If the method is a function and the current line is empty it will prepend a _Result:=_.
104+```
97105function TMyClass.ExecuteAction(Action: TBasicAction): Boolean;
98-begin
99- Result:=inherited ExecuteAction(Action);
100-end;
106+ begin
107+ Result:=inherited ExecuteAction(Action);
108+ end;
101109```
102110
103111# Add Assign method
104112
105-- Requires: cursor in a class
106-- Menu item: Source Editor / popup / Refactor / Add Assign method ...
107-- Shortcut name: *Add Assign method* (in the IDE under options Editor / Key mapping)
108-
109-If you are using Object Pascal, then you often need to copy an object and so you will probably often write an Assign method. This tool generates the method automatically for you and gives you a dialog to quickly select the members to copy. Here is an example of a produced method code:
113+ * Requires: cursor in a class
114+ * Menu item: Source Editor / popup / Refactor / Add Assign method ...
115+ * Shortcut name: _Add Assign method_ (in the IDE under options Editor / Key mapping)
110116
111-``` pascal
117+If you are using Object Pascal, then you often need to copy an object and so you will probably often write an Assign method. This tool generates the method automatically for you and gives you a dialog to quickly select the members to copy. Here is an example of a produced method code:
118+```
112119type
113- TMyClass = class(TComponent)
114- private
115- FMyInt: integer;
116- public
117- procedure Assign(Source: TPersistent); override;
118- property MyInt: integer read FMyInt write FMyInt;
119- end;
120-
121-procedure TMyClass.Assign(Source: TPersistent);
122-var
123- aSource: TMyClass;
124-begin
125- if Source is TMyClass then
126- begin
127- aSource:=TMyClass(Source);
128- MyInt:=aSource.MyInt;
129- end else
130- inherited Assign(Source);
131-end;
120+ TMyClass = class(TComponent)
121+ private
122+ FMyInt: integer;
123+ public
124+ procedure Assign(Source: TPersistent); override;
125+ property MyInt: integer read FMyInt write FMyInt;
126+ end;
127+
128+ procedure TMyClass.Assign(Source: TPersistent);
129+ var
130+ aSource: TMyClass;
131+ begin
132+ if Source is TMyClass then
133+ begin
134+ aSource:=TMyClass(Source);
135+ MyInt:=aSource.MyInt;
136+ end else
137+ inherited Assign(Source);
138+ end;
132139```
133140
134-<figure>
135-<img src="Cody_add_assign_method1.png" title="Cody_add_assign_method1.png" />
136-<figcaption>Cody_add_assign_method1.png</figcaption>
137-</figure>
141+[![Cody add assign method1.png](/wiki-images/2/22/Cody_add_assign_method1.png)](</File:Cody_add_assign_method1.png>)
138142
139-- Method name: type in the name of the new method. It is automatically checked if there is already such a method or if an ancestor has inherited one.
140-- Parameter name: the parameter name is taken from the inherited method, otherwise **Source**.
141-- Parameter type: the parameter type is taken from the inherited method, otherwise **TObject**. If this type is different than the current class an if-then-else block is added.
142-- If there is an inherited method:
143- - Check 'Override' to override it. This appends the **override** method modifier.
144- - Check 'Call inherited' to add a line 'inherited'.
145- - Check 'Call inherited only if wrong class' to call the inherited method only in the **else** part. This is needed for all direct descendants of **TPersistent**.
146-- Select members to assign:
147- - This lists all variables and all properties that are assignable (readable and writable).
148- - It also shows if a variable is written by a property.
149- - You can select/unselect by clicking on a member.
143+ * Method name: type in the name of the new method. It is automatically checked if there is already such a method or if an ancestor has inherited one.
144+ * Parameter name: the parameter name is taken from the inherited method, otherwise **Source**.
145+ * Parameter type: the parameter type is taken from the inherited method, otherwise **TObject**. If this type is different than the current class an if-then-else block is added.
146+ * If there is an inherited method:
147+ * Check 'Override' to override it. This appends the **override** method modifier.
148+ * Check 'Call inherited' to add a line 'inherited'.
149+ * Check 'Call inherited only if wrong class' to call the inherited method only in the **else** part. This is needed for all direct descendants of **TPersistent**.
150+ * Select members to assign:
151+ * This lists all variables and all properties that are assignable (readable and writable).
152+ * It also shows if a variable is written by a property.
153+ * You can select/unselect by clicking on a member.
150154
151155# Explode a "With" block
152156
153-This tool removes a **With** and inserts the with expression in front of each identifier needing it.
154-
155-- Requires: cursor on a **With** expression (e.g. the variable between the keywords **With** and **Do**)
156-- Menu item: Source Editor / popup / Refactoring / Remove With block
157-- Shortcut name: *Remove With block* (in the IDE under options Editor / Key mapping)
157+This tool removes a **With** and inserts the with expression in front of each identifier needing it.
158158
159-For example:
159+ * Requires: cursor on a **With** expression (e.g. the variable between the keywords **With** and **Do**)
160+ * Menu item: Source Editor / popup / Refactoring / Remove With block
161+ * Shortcut name: _Remove With block_ (in the IDE under options Editor / Key mapping)
160162
161-``` pascal
163+For example:
164+```
162165with Button1 do begin
163- Name:='Button1';
164- Caption:='Ok';
165-end;
166+ Name:='Button1';
167+ Caption:='Ok';
168+ end;
166169```
167170
168-becomes:
169-
170-``` pascal
171+becomes:
172+```
171173Button1.Name:='Button1';
172-Button1.Caption:='Ok';
174+ Button1.Caption:='Ok';
173175```
174176
175177# Add a "With" block
176178
177-This tool adds a **With** around the selection of the Source Editor and removes all occurrences of the expression.
178-
179-- Requires: selected Pascal statements in the Source Editor with at least one expression to shorten
180-- Menu item: Source Editor / popup / Refactoring / Add With block
181-- Shortcut name: *Add With block* (in the IDE under options Editor / Key mapping)
179+This tool adds a **With** around the selection of the Source Editor and removes all occurrences of the expression.
182180
183-For example:
181+ * Requires: selected Pascal statements in the Source Editor with at least one expression to shorten
182+ * Menu item: Source Editor / popup / Refactoring / Add With block
183+ * Shortcut name: _Add With block_ (in the IDE under options Editor / Key mapping)
184184
185-``` pascal
185+For example:
186+```
186187Button1.Name:='Button1';
187-Button1.Caption:='Ok';
188+ Button1.Caption:='Ok';
188189```
189190
190-becomes:
191-
192-``` pascal
191+becomes:
192+```
193193with Button1 do begin
194- Name:='Button1';
195- Caption:='Ok';
196-end;
194+ Name:='Button1';
195+ Caption:='Ok';
196+ end;
197197```
198198
199-**Beware:** This function does not check for conflicts. For example:
200-
201-``` pascal
199+**Beware:** This function does not check for conflicts. For example:
200+```
202201procedure TForm1.Button1Click(Sender: TObject);
203-begin
204- Button1.Enabled:=Enabled;
205-end;
202+ begin
203+ Button1.Enabled:=Enabled;
204+ end;
206205```
207206
208-When you enclose the assignment the function will stupidly convert to:
209-
210-``` pascal
207+When you enclose the assignment the function will stupidly convert to:
208+```
211209procedure TForm1.Button1Click(Sender: TObject);
212-begin
213- with Button1 do begin
214- Enabled:=Enabled; // wrong
215- end;
216-end;
210+ begin
211+ with Button1 do begin
212+ Enabled:=Enabled; // wrong
213+ end;
214+ end;
217215```
218216
219-Notes:
217+
218+Notes:
220219
221-- The function does *not* check if the change breaks the code.
222-- When you want to enclose a whole procedure, select all statements, **excluding** the *begin/end* keywords.
223-- The function does not check if the selection starts or ends within a statement. It will enclose only the text within the selection, no matter if this results in wrong code. Undo is your friend.
220+ * The function does *not* check if the change breaks the code.
221+ * When you want to enclose a whole procedure, select all statements, **excluding** the _begin/end_ keywords.
222+ * The function does not check if the selection starts or ends within a statement. It will enclose only the text within the selection, no matter if this results in wrong code. Undo is your friend.
224223
225224# Declare Variable
226225
227-This tool is an interactive version of [[Lazarus IDE Tools|Variable Declaration Completion]]. It tries to guess the type and context of the identifier at cursor and gives you a list of possible places to declare the variable.
228-
229-- Requires: cursor on an undeclared identifier in a statement.
230-- Menu item: Source Editor / popup / Refactoring / Declare Variable
231-- Shortcut name: *Declare Variable* (in the IDE under options Editor / Key mapping)
226+This tool is an interactive version of [[Lazarus IDE Tools|Variable Declaration Completion]]. It tries to guess the type and context of the identifier at cursor and gives you a list of possible places to declare the variable.
232227
233-<figure>
234-<img src="Cody_declare_var1.png" title="Cody_declare_var1.png" />
235-<figcaption>Cody_declare_var1.png</figcaption>
236-</figure>
228+ * Requires: cursor on an undeclared identifier in a statement.
229+ * Menu item: Source Editor / popup / Refactoring / Declare Variable
230+ * Shortcut name: _Declare Variable_ (in the IDE under options Editor / Key mapping)
237231
238-For example:
232+[![Cody declare var1.png](/wiki-images/0/03/Cody_declare_var1.png)](</File:Cody_declare_var1.png>)
239233
240-``` pascal
234+For example:
235+```
241236procedure DoSomething;
242-begin
243- i:=3;
244-end;
237+ begin
238+ i:=3;
239+ end;
245240```
246241
247-Place the cursor on the **i** and invoke the dialog. Select "local variable" and click Ok. The result is
248-
249-``` pascal
242+Place the cursor on the **i** and invoke the dialog. Select "local variable" and click Ok. The result is
243+```
250244procedure DoSomething;
251-var
252- i: Integer;
253-begin
254- i:=3;
255-end;
245+ var
246+ i: Integer;
247+ begin
248+ i:=3;
249+ end;
256250```
257251
258-You can declare member variables:
259-
260-``` pascal
252+You can declare member variables:
253+```
261254procedure DoSomething(A: TMyClass);
262-begin
263- A.Identifier:='Declare a variable in TMyClass';
264-end;
255+ begin
256+ A.Identifier:='Declare a variable in TMyClass';
257+ end;
265258```
266259
267-You can declare variables on the clipboard. This gives you superior control where the new variable is declared. Move the source editor cursor to the destination and paste (e.g. <span class="kbd">Ctrl</span>+<span class="kbd">V</span>). Cody will automatically create a new var section if needed.
260+You can declare variables on the clipboard. This gives you superior control where the new variable is declared. Move the source editor cursor to the destination and paste (e.g. `Ctrl`+`V`). Cody will automatically create a new var section if needed.
268261
269262## Features
270263
271-- keeps the cursor. You can quickly define a variable without moving/changing your source editor.
272-- Guesses type of assignments: *identifier:=\<expression\>*, this includes *for i:=0 to*
273-- Guesses type of for in: *for identifier in \<list type\>*
274-- nested procedures: allows to define a variable on every level
275-- **with** blocks: every with adds its contexts
276-- class sections: private, protected, public, published
277-- interface, implementation, program, package, library
278-- checks if identifier is already declared
279-- automatically adds the needed unit for the type
280-- it can create the declaration on the clipboard. This creates a special format on the clipboard containing all needed information so that a paste will add the needed unit to the uses section. Or you can paste it into another application.
264+ * keeps the cursor. You can quickly define a variable without moving/changing your source editor.
265+ * Guesses type of assignments: _identifier:= <expression>_, this includes _for i:=0 to_
266+ * Guesses type of for in: _for identifier in <list type>_
267+ * nested procedures: allows to define a variable on every level
268+ * **with** blocks: every with adds its contexts
269+ * class sections: private, protected, public, published
270+ * interface, implementation, program, package, library
271+ * checks if identifier is already declared
272+ * automatically adds the needed unit for the type
273+ * it can create the declaration on the clipboard. This creates a special format on the clipboard containing all needed information so that a paste will add the needed unit to the uses section. Or you can paste it into another application.
281274
282275# Unit / Identifier Dictionary
283276
284-Cody keeps track of all global identifiers the IDE has ever encountered. This tool lets you browse this IDE history. You can **jump to the identifier** in the source editor or you can **use the identifier**. **Using** means inserting/replacing the identifier at the current source editor position, extending the uses section and extending the project/package dependencies. In other words, this tool is like *identifier completion*, but with a far-reaching search scope.
277+Cody keeps track of all global identifiers the IDE has ever encountered. This tool lets you browse this IDE history. You can **jump to the identifier** in the source editor or you can **use the identifier**. **Using** means inserting/replacing the identifier at the current source editor position, extending the uses section and extending the project/package dependencies. In other words, this tool is like _identifier completion_ , but with a far-reaching search scope.
285278
286-- Requires: placing the cursor on an identifier in the source editor.
287-- Menu item: Source Editor / (right-click to get the popup menu) / Source / Show Unit/Identifier Dictionary... OR (main menu) Source / Show Unit/Identifier Dictionary...
288-- Shortcut name: *Show unit / identifier dictionary* (in the IDE under Options / Editor / Key mapping)
279+ * Requires: placing the cursor on an identifier in the source editor.
280+ * Menu item: Source Editor / (right-click to get the popup menu) / Source / Show Unit/Identifier Dictionary... OR (main menu) Source / Show Unit/Identifier Dictionary...
281+ * Shortcut name: _Show unit / identifier dictionary_ (in the IDE under Options / Editor / Key mapping)
289282
290-<figure>
291-<img src="Identifierdictionary1.png" title="Identifierdictionary1.png" />
292-<figcaption>Identifierdictionary1.png</figcaption>
293-</figure>
283+[![Identifierdictionary1.png](/wiki-images/d/d6/Identifierdictionary1.png)](</File:Identifierdictionary1.png>)
294284
295-- The top line gives a statistical summary about the current database.
296-- **Hide units of other projects**: By default the dialog shows only the normal identifiers (that is: current project units, package units, and FPC units). If you want data from a unit in some other project, it is best to put that unit into a package. Nevertheless this dialog supports using units of other projects too. Doing so will extend the unit search path.
297-- **Filter**: This text filters the listed identifiers. It works case-insensitively. Exact matches are shown first. If an identifier is defined in more than one unit, there will be an entry for each unit. Note that this is only a **history**. The data may be outdated.
298- - **Starts**: Shows only identifiers that begin with the given text.
299- - **Contains**: Shows only identifiers that contain the given text.
300- - You can use Up and Down keys to move the selected identifier.
301-- *Unit*, *Package*: This means the selected identifier's unit/package file.
302-- **Add unit to implementation uses section**: When using an identifier this tool checks if the unit is already in the uses section and will add it if needed. If the source editor is in the implementation section you can choose which uses section to use.
303-- **Help**: Opens this help page.
304-- **Jump to**: Opens the package if needed, opens the file in the source editor and jumps to the identifier. If the identifier has vanished since the last time you opened the file in the IDE, you will get an error.
305-- **Cancel**: Closes the dialog without any action.
306-- **Use identifier**: Opens the package if needed. Replaces the current identifier in the source editor. If needed the uses section(s) is/are updated. If needed, CodeTools adds a package dependency and/or extends the unit search path. It does some sanity checks for possible unit or package conflicts and may give an error. For instance, if the identifier has vanished since the last time you opened the file in the IDE, you will get an error.
307-- **Options: Under Tools / Options / Codetools / Cody**
308- - **Load dictionary after X seconds**: The dictionary is not loaded immediately on start up, so the IDE starts quickly even if the CodeTools database is extensive. The database is loaded when needed, or after a pause whose length you can specify here.
309- - **Save dictionary every X minutes**: The dictionary is updated on idle whenever the IDE parses fresh source text. The dictionary is written to disk at intervals. It is written in another thread, so you won't notice it.
310- - **Save dictionary now**: This forces an immediate write to disk.
285+ * The top line gives a statistical summary about the current database.
286+ * **Hide units of other projects** : By default the dialog shows only the normal identifiers (that is: current project units, package units, and FPC units). If you want data from a unit in some other project, it is best to put that unit into a package. Nevertheless this dialog supports using units of other projects too. Doing so will extend the unit search path.
287+ * **Filter** : This text filters the listed identifiers. It works case-insensitively. Exact matches are shown first. If an identifier is defined in more than one unit, there will be an entry for each unit. Note that this is only a **history**. The data may be outdated.
288+ * **Starts** : Shows only identifiers that begin with the given text.
289+ * **Contains** : Shows only identifiers that contain the given text.
290+ * You can use Up and Down keys to move the selected identifier.
291+ * _Unit_ , _Package_ : This means the selected identifier's unit/package file.
292+ * **Add unit to implementation uses section** : When using an identifier this tool checks if the unit is already in the uses section and will add it if needed. If the source editor is in the implementation section you can choose which uses section to use.
293+ * **Help** : Opens this help page.
294+ * **Jump to** : Opens the package if needed, opens the file in the source editor and jumps to the identifier. If the identifier has vanished since the last time you opened the file in the IDE, you will get an error.
295+ * **Cancel** : Closes the dialog without any action.
296+ * **Use identifier** : Opens the package if needed. Replaces the current identifier in the source editor. If needed the uses section(s) is/are updated. If needed, CodeTools adds a package dependency and/or extends the unit search path. It does some sanity checks for possible unit or package conflicts and may give an error. For instance, if the identifier has vanished since the last time you opened the file in the IDE, you will get an error.
297+ * **Options: Under Tools / Options / Codetools / Cody**
298+ * **Load dictionary after X seconds** : The dictionary is not loaded immediately on start up, so the IDE starts quickly even if the CodeTools database is extensive. The database is loaded when needed, or after a pause whose length you can specify here.
299+ * **Save dictionary every X minutes** : The dictionary is updated on idle whenever the IDE parses fresh source text. The dictionary is written to disk at intervals. It is written in another thread, so you won't notice it.
300+ * **Save dictionary now** : This forces an immediate write to disk.
311301
312302# Creating a new dockable IDE Window
313303
314-Cody adds a new form type "IDE Window, dockable", which allows to easily create a new dockable IDE window like the Code Explorer or the FPDoc editor.
304+Cody adds a new form type "IDE Window, dockable", which allows to easily create a new dockable IDE window like the Code Explorer or the FPDoc editor.
315305
316-- Requires: A designtime package
317-- Menu item: Package Editor / Add / IDE Window, dockable
306+ * Requires: A designtime package
307+ * Menu item: Package Editor / Add / IDE Window, dockable
318308
319-It also generates code to register a menu item in the View menu and a shortcut.
309+It also generates code to register a menu item in the View menu and a shortcut.
320310
321-Usage:
311+Usage:
322312
323-- Create the form via *Package Editor / Add / IDE Window, dockable*
324-- Change the names and the captions
325-- Save it
326-- Install the package and restart the IDE
327-- You can access your new window via the View menu.
313+ * Create the form via _Package Editor / Add / IDE Window, dockable_
314+ * Change the names and the captions
315+ * Save it
316+ * Install the package and restart the IDE
317+ * You can access your new window via the View menu.
328318
329319# See also
330320
331-- [[Lazarus IDE Tools]] - A tutorial about the built-in tools of the standard IDE
332-- [[Codetools]] - How to program new tools yourself
333-- [[Extending the IDE]] - How to write your own codetools plugins for the IDE.
321+ * [[Lazarus IDE Tools]] \- A tutorial about the built-in tools of the standard IDE
322+ * [[Codetools]] \- How to program new tools yourself
323+ * [[Extending the IDE]] \- How to write your own codetools plugins for the IDE.
334324
335325---
336-*From the Free Pascal wiki, page "Cody", as it stood on 2020-02-08 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
337-Category: Lazarus IDE plugins
326+*From the Free Pascal wiki, page "Cody", as the Internet Archive kept it on 2024-09-20. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history