自Delphi7之后,Delphi IDE的所有新特性

本文介绍了 Delphi 7 发布后 IDE 中的重大新功能,包括 MSBuild 构建引擎、文件浏览器、实时模板、代码折叠等功能,以及增强的调试特性、重构操作和集成单元测试等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

从Delphi官网转过来的,原地址:http://edn.embarcadero.com/cn/article/34323

作者: Nick Hodges

摘要: See some of the major new features in the Delphi IDE that came after the Delphi 7 release

IDE Features Since Delphi 7

Find out More

MSBuild Build Engine The IDE now uses MSBuild as the IDE's build engine.  This allows for build configurations, pre- and post-build events, and IDE builds that are the same as command-line builds.

Hide image


File Explorer The IDE now has a File Explorer built into it that allows for access to files on the machines hard drive. Files can be added to projects or opened in the Code Editor. The File Browser can be docked into the IDE like any other dockable window.

Hide image


Live Templates

Live Templates speed-up  typing by providing template-based code insertion.  Live Templates are simple XML files, so developers can write their own code templates depending on their specific needs.

Below is a picture of Live Templates in action, creating a try...finally block:

Hide image

See a demo of Live Templates in the Turbo Delphi IDE
Block Completion Block Completion ensures that code blocks are properly closed. It will automatically close a block (usually with an 'end;') when hitting return after opening a code block.

Hide image
		BlockCompletion


History Tab

The History Tab functions as a very simple source control system.  Each time a file is saved, a backup is made and stored in a subdirectory.  The IDE tracks these follows and allows the developer to review earlier versions of the file using a diff engine.  If an older version of the file is needed, it can replace the existing file.  The screenshot below shows the history tab doing a diff on two previous versions of a file:

Hide image
Click to see full-sized image

View a demontrations of the History Manager online
Enhanced Debugging Features New debugger features include:
  1. CPU view panes can be opened individually outside of an editor tab
  2. "Show Opcodes" local menu item in the disassembly pane
  3. "Show Addresses" local menu item in the disassembly pane
  4. New option on Tools | Options | Debugger Options | Event Log: "Scroll new events into view"
  5. New option on Tools | Options | Debugger Options | Borland Debuggers: "Ignore non-user breakpoints"
  6. New toolbar button available when customizing the toolbar: "Notify on language exceptions" -- this button allows developers to quickly toggle the "Notify on Language Exceptions" option found on Tools | Options | Debugger Options | Borland Debuggers | Language Exceptions
  7. Evaluator tooltip hints go transparent when the CTRL key is pressed, allowing developers to see through them to the editor
  8. Call Stack View now shows a glyph indicating if the frame has debug info
  9. Call Stack View now lets developers to set a breakpoint on a given stack frame location
  10. Call Stack view now automatically syncs the Locals view when double-clicking an item
  11. Keystroke CTRL-F5 in the editor will enable/disable a breakpoint set on the current line
  12. "Debug Source Path" setting for all project types (including Delphi.Win32) is now settable via Project | Options | Debugger. Previously, for Delphi.Win32, this setting was on the Directories/Conditionals page. It was missing from the other personalities.
  13. The CPU view now participates in the "Automatically close files implicitly opened while debugging" option setting.
See a demo of the debugger in the Turbo Delphi IDE.
VCL Guidelines The VCL Designer now provides guidelines that make spacing and aligning controls a vastly easier task. When controls are properly aligned or spaced, the designer will display a visual guideline that helps "snap" the components into alignment. The graphic below shows the feature in action.

Hide image


Code Folding

The editor can "fold" individual sections of code so that the folded code is hidden from view.  By default, functions and procedures are folded.  Users can define their own sections of code to be folded using the {$REGION} pragma.

Hide image


SyncEdit

The SyncEdit feature lets developers simultaneously edit identical identifiers in code. As changes are made to the first identifier, the same change is performed automatically on the other identifiers. Code Writers  can also tab to different jump points to navigate to specific identifiers in code.

Hide image


Searchable Tool Palette

The tool palette is now searchable and filterable.   Users can quickly find a component by simply typing the name or part of the name of a component.  The Tool Palette is also very configurable.  Developers can easily create their own categories and drag-n-drop components from one category to another.

Hide image


Editor Line Numbers

The editor now provides line numbering. By default, every tenth line is numbered, as well as the line number for the current line.  Users can also choose to turn off line numbering, or to have every line numbered.

Hide image


Line Change Indicators

The Gutter shows information about the status of the lines in the editor.  Lines changed since the last save are marked with a yellow bar. Lines changed since the file was first opened and before the last save are marked with green.

Hide image


Refactoring

Refactoring is a technique used to restructure and modify existing code in such a way that the intended behavior of the code stays the same. Refactoring allows developers to stream-line, simplify, and improve both performance and readability of application code. 

Delphi 2007 for Win32 provides the following refactoring operations:

  • Symbol Rename
  • Extract Method
  • Declare Variable
  • Declare Field
  • Find References
  • Extract Resourcestring
  • Find Unit
  • Change Parameters
  • Introduce Field
  • Introduce Variable
  • Inline Variable
  • Safe Delete

Integrated Unit Testing

Delphi 2007 for Win32 ships with built-in support for DUnit.  This framework simplifies the process of building tests for classes and methods in application. Using unit testing in combination with refactoring can improve application stability. Testing a standard set of tests every time a small change is made throughout the code makes it more likely that errors will be caught early in the development cycle. The IDE provides wizards that allow developers to quickly and easily create unit tests for existing code libraries.

Hide image


Class and UML Modeling

Developers can do full UML and Class Modeling with Delphi, including two-way class modeling.

Hide image


评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值