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

从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
自Delphi7之后,Delphi IDE的所有新特性_第1张图片


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
自Delphi7之后,Delphi IDE的所有新特性_第2张图片

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


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
自Delphi7之后,Delphi IDE的所有新特性_第3张图片

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
自Delphi7之后,Delphi IDE的所有新特性_第4张图片


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
自Delphi7之后,Delphi IDE的所有新特性_第5张图片


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
自Delphi7之后,Delphi IDE的所有新特性_第6张图片


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
自Delphi7之后,Delphi IDE的所有新特性_第7张图片


Class and UML Modeling

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

Hide image
自Delphi7之后,Delphi IDE的所有新特性_第8张图片


你可能感兴趣的:(ide,Delphi,features,templates,Components,Refactoring)