New IDE features since

From Free Pascal wiki
Revision as of 15:36, 14 March 2014 by HowardPC (talk | contribs) (Messages menu item for circular unit not found)

This page contains a list of major IDE features that made Lazarus even more impressive. All features are sorted by the Lazarus release version that they became available in.

If you would like to contribute to this page, please read the following page (Creating animated gifs for wiki) giving hints on creating animated gifs for this wiki.

Contents

prior to v0.9.4 (2004 and earlier)

form designer guidelines (June 2002)

The Form Designer shows green or blue guidelines when you position components. This help you align or size components correctly. When components are correctly aligned or sized, then guidelines are shown.

Ide features design guidelines.gif

(2005-01-09)

Invert Assignment tool

v0.9.10 (2005-10-06)

Integrated Documentation Editor

Lazarus IDE is now capable of editing the external fpdoc help (xml) files while you are working with the source code. The FPDoc Editor can be found at: View -> FPDoc Editor menu option. As you navigate your code, the FPDoc Editor window gets updated with the related documentation. External help files prevent you from obfuscating your source code. fpdoc is similar to the JavaDoc technology, but with its own features and syntax.

Ide features fpdoc editor.gif

v0.9.18 (2006-09-18)

procedure list

This makes finding methods in your current unit really fast! It can be found at Search > Procedure list (Hotkey is Alt+G). The procedure list enables you to view a list of Free Pascal / Lazarus procedures in the current unit and quickly jump to the implementation. Include files are also supported and the method list gets filtered as you type the partial method name.

Ide features procedure list.gif

v0.9.20 (2006-11-05)

divider lines in editor

The Lazarus editor supports drawing horizontal divider lines between classes, methods, nested procedures, begin..end blocks and many more. So now there is no need to add extra blank lines or {*******...} comments between classes or methods. In the upcoming v0.9.28 release this feature is very customizable in the "Environment > Options > Editor > Divider Drawing" screen. In the following screenshot it shows some divider lines using the default color and a divider line for nested procedures using a customized color.

Ide features divider lines.png

v0.9.24 (2007-11-05)

editor toolbar

The editor toolbar plug-in allows you to define toolbar buttons to any of the IDE menu items.

Ide features editor toolbar.png

v0.9.26 (2008-10-25)

fpdoc help inside editor tooltips

Lazarus can now display fpdoc documentation inside the tooltip help. Packages and Project can all be setup to find the related fpdoc (*.xml) help files, which then enables Lazarus to display the extended help in the tooltips. Simply hover the mouse over various parts of the code to see the tooltips in action. In the image below the mouse was hovered over the TCollection class definition.

Ide features fpdoc tooltip.png

v0.9.28 (2009-10-12)

block matching

The IDE automatically highlights matching blocks - begin..end pairs.

block matching.gif

code macro OfAll

The code templates of the IDE can use code macros. Writing code macros is easy. The new code macro $OfAll() creates a list of enums for case statements as demonstrated in the image below:

CodeMakroOfAll.gif

(Hint: The separator line between text and folder marks can be enabled via Margin and gutter)

New users will automatically get the new macro. Old users can either delete their ~/.lazarus/lazarus.dci or add the template themselves. How to create the template:

  • IDE menu / Environment / code templates
  • Add. Token: "ofall" or whatever you like. Comment: "case variable of <list of all enums> end"
  • Click ok to add it
  • The new template is selected below.
  • check "Enable macros"
  • The code of the template:
of
|$OfAll()end;
  • click ok to save and close the templates.

Code Templates with macro $Param

Image-Ide features trycf demo.gif

To use this feature add the following macro (or delete your old config):

$param(variable) := $param(typename).Create;
try
  |
finally
  $param(variable,sync=1).Free;
end;

Syncron-Edit

SynEditSyncro.gif

v0.9.30 (2011-03-28)

Multi Source Editor

Lazarus can now open as many Source-Editor-Windows as you want, and you can freely move files between them.

It is also possible to view the same file in multiple Windows.

Three src edit medium2.png

[|Multiply Source-Editor-Windows]

Docked IDE

The IDE now supports docking. Install either the package AnchorDockingDsgn or EasyDockMgrDsgn.

Ide docked.png

Code folding with hiding option for Comments

Comments in the source code can be completely folded away (hidden). The context menu (on the fold gutter) provides info on the nested folds at the selected line

FoldHideComments2.png

v1.0 (2012-08-29)

Add new items here.

Folding (Hiding) text by selection

Lazarus can now fold any text/code segment you want. Just select the text and hide it. (These folds are not remembered in the session, restoring folds on load only works for folds at keywords)

Fold selection.gif

Watches/Locals History in debugger

A history of Watches and Locals

More Info: [blog] LazDbgHistory.png


Macro Recorder for Code Editor

The source-code editor can record and play macros

Procedure/Class-Name Hint for long declarations

The editor displays an embedded hint with the name of the current Procedure/Class if the top of the declaration is scrolled out

v1.2 (2014-03-04)

Command Macros can be saved

Editor macros.png

Support for multiple command macros, that can be saved with session or IDE config. IDE_Window:_Editor_Macros

PascalScript macros

Multiple user defined word highlight/markup

The user can define any amount of different markup settings, and assign his own choice of words,expressions (one line terms) to them. This allows to highlight all occurrences of one or more identifiers of interest.

Words to be highlighted can be toggled via keyboard. Words can be highlighted per editor, or across all editors. A list of pre-defined words can be defined, that will be active when the IDE starts.

SynUserDefinedMarkup.png

See documentation

Package Graph Control

The package graph now shows the package dependencies as graph.

This new control is part of the package LazControls and used by the IDE itself as well. The control shows a graph consisting of nodes and edges as a level graph (this type of graph is also called a layered graph).

packagegraph1.png

Dialog to find and remove unneeded package dependencies

Available via package editor / context menu of a dependency or via the package graph.

cleanuppackagedependencies1.png

Auto-continue for comments and strings

Project Additions and Overrides

Projects can now add compiler options to packages and override the output directories depending on the current build mode. You can also add compiler options to all projects on a machine depending on build mode.

Additions and Overrides

CompilerAdditionsAndOverrides1.png

Low-lighting inactive $IFDEF code

Source Editor IFDEF lowlight.png

Unit Dependencies

You can now find out what units uses a unit.

Unit Dependencies

UnitDependencies1.png

Messages menu item for circular unit not found

When you create a cycle between units, the compiler only reports one edge of the cycle. Right click on the message / Show unit dependencies will open the unit dependencies dialog with a full path from unit A to unit B to unit A.

Find references of used unit

Position source editor cursor on a unit within a uses clause. Then right click / Find / Find references of used unit. This will find all references within the current unit to the used unit.

v1.4 (to be announced)

Unsorted

Any items below this point has not been sorted per Lazarus release yet.


built-in diff viewer

...

refactoring

...


favorites in Object Inspector

...

integrated unit testing with FPCUnit

...

better anchoring and margins in form designer

...

file browser

...


CodeTools

  • word completion
  • Rename component in Designer auto-renames all instances in unit.

...

Include files

...

Lazarus Packages

...

Enclose Selection

Select some text in editor. Right Click to get popup menu. Select "Refactoring > Enclose Selection".

Quick Fix: Remove unit

In messages window

Code Observer

...

Line Change indicators

...