SlideShare a Scribd company logo
DOES THE DELPHI IDE NARROW YOU?
EXTEND IT!
Marco Breveglieri
MARCO BREVEGLIERI
Homepage: www.breveglieri.it 👈
Blog: www.compilaquindiva.com 👈
Delphi Podcast: www.delphipodcast.com 👈
ABLS TEAM Software and Web (Reggio Emilia)
featuring «Leo»
WHAT DO WE TALK
ABOUT?
Plugins!
Extensions!
Experts!
Add-ons!
What do we talk about?
Plugins have made the success of many
apps.
• Browsers
o Mozilla Firefox
o Google Chrome
• CMS
o Wordpress
o Drupal
• Developer tools
o Atom
o Eclipse
o Visual Studio Code
Sometimes, plugins are the piece
of software that really matters.
Plugins, plugins, plugins!
Delphi has some really good add-ons or
tools, freeware or opensource.
• General purpose and coding
• GExperts
• ModelMaker Code Explorer (MMX)
• CnPack Wizards
• DDevExtensions
• Documentation Insight
• Castalia
• Error handling
• Eureka Log
• madExcept
• Testing and quality
• Automated QA
• Test Insight
• Hot fixes
• Delphi SpeedUp
• IDE Fix Pack
…and many others… 👌
But Delphi often lacks specific, targeted
and «feature focused» plugin. 🤔
What about Delphi?
What do I mean?
Open Command
Line
Add New File Trailing Whitespace
Visualizer
Dummy Text
Generator
Show Selection
Length
XML, XPath
& XSLT Tools
Comment
Remover
Console Launcher
Solution Cleaner PowerShell Prompt Encourage Farticus
The only limit is the sky!
Many scenarios deals with writing code, but this is not always the case.
You can create
• Productivity tools that add file templates and projects, refactoring and
cleaning code, add new dialogs or tool windows.
• Support for new syntax and languages directly in the editor.
• Domain specific designers that allow you to «draw» a model and optionally
produce the code (or not).
• Extend debugging features
• Create replacements, integrations and work arounds of limited or disliked IDE
features
What can I do?
• Do things faster!
• Invest more time in automation than documentation
• More speed, less errors, high reliability, soft learning curve
• Share your tools with colleagues or an entire community to get
feedback and improvements, and also new tools
• Decorate your framework with templates for projects and modules
• Fix Delphi bugs or implement workarounds waiting for fixes
• Last but not least… have fun!
Benefits
Nobody is perfect.
Not even Delphi.
What can we do?
Let’s build some
Experts!
So what?
TOOLS API
• Suite of over 100 interfaces!
• Let’s you interact with and control the IDE
Main action lists, image lists and menus
Tool bars
Modules and source editors
Keyboard macros and bindings
Forms (and their components)
Debugger and Breakpoints
Code Completion
Message View
To-Do List
Build process
Project and Item Repository
What is Tools API
• All the interfaces are inside a unique code file:
C:Program Files (x86)EmbarcaderoStudio20.0sourceToolsAPI.pas
• You can implement some interfaces to extend the IDE
• ToolsAPI provides some main kinds of extensions
• Wizard
a sort of setup class to easily build simple features (or host complex ones)
• Notifier
a class that contains logic that Delphi calls back when something interesting happens
• Creator
a class that supports the creation of new project, modules, units or virtually any kind of file
How to use ToolsAPI
interface
uses
ToolsAPI;
type
TFirstWizard = class(TInterfacedObject, IOTAWizard)
public
procedure Execute;
function GetIDString: string;
function GetName: string;
function GetState: TWizardState;
procedure AfterSave;
procedure BeforeSave;
procedure Destroyed;
procedure Modified;
end;
Sample Wizard
Where to put the code
Package
(.dpk)
Library
(.dll)
Library (.dll)
Library
(.dll)
• Quite «old school» solution
• They must be installed via registry
• Runtime packages are required!
• Registration, initialization and
finalization code is more complex
o You have to set the Application
variable
o What about the Memory Manager?
• Delphi loads them early (some
menus to anchor to may not be
available)
• Natural container for all the
elements in Delphi (types,
records, classes, interfaces,
routines, forms, frames, data
modules, …)
• Use of runtime packages is
embedded
• Register classes (and hence
experts) is easy and
straightforward
• They can be installed/uninstalled
«hot» and «live» directly from
the IDE
Where to put the code
Package
(.dpk)
Demo
• There is little… no documentation 😢
• You should refer to the comments inside «ToolsAPI.pas»
• Pay attention! Your code runs inside the IDE
• Delphi can crash or hang if your code misbehave or has errors
• Testing is difficult, debugging even more!
• If you are unsure, install the tool using a separate profile
• Launch the Delphi IDE (bds.exe) as the Host Application
• An effective «Code DOM» and a working parser would be appreciated
• We hope that LSP support will resolve this issue and fill the gap
Warning!
IDE SERVICES
NTA (Native Tools API)
• Grants direct access to actual IDE
objects, such as the TMainMenu
object of the IDE.
• The wizard must use RAD Studio
packages (rtl, vcl, …).
• The wizard is tied to a specific
version of the IDE.
Native/Open Interfaces
OTA (Open Tools API)
• Interfaces do not grant full access
to the IDE.
• All the functionality is available
through OTA interfaces.
• Interacting and extending the IDE
occurs with the OTA layer as a
mediator.
• Services give access to specific features through interfaces.
• Interfaces can be obtained from one single global variable:
BorlandIDEServices.
• To get a service reference, you can call the Supports() method
or cast BorlandIDEServices to the required type.
• Some interfaces have numbers (are versioned when changed).
Tools API Services
procedure SetKeystrokeDebugging(Debugging: Boolean);
var
Service: IOTAKeyboardDiagnostics;
begin
if Supports(BorlandIDEServices,
IOTAKeyboardDiagnostics, Service) then
Dialog.KeyTracing := Debugging;
end;
Get a service /1
var
LServices: IOTAWizardServices;
begin
LServices := BorlandIDEServices as IOTAWizardServices;
WizardIndex := LServices.AddWizard(TFirstWizard.Create);
end;
begin
with BorlandIDEServices as IOTAWizardServices do
WizardIndex := AddWizard(TFirstWizard.Create);
end;
Get a service /2
Demo(s)
RECAP
• Delphi (RAD Studio) Documentation
http://docwiki.embarcadero.com/RADStudio/Rio/en/Extending_the_IDE_Using_the_Tools_API
• Dave’s (David Hoyle) Development Blog
https://www.davidghoyle.co.uk/WordPress/?page_id=667
• Stack Overflow
https://stackoverflow.com/search?q=delphi+ota
Resources
Q & A
Does The Delphi IDE Narrow You? Extend It! - ITDevConX European Delphi Conference 2019

More Related Content

PPTX
Eclipse workshop presentation (March 2016)
PDF
"Architecting and testing large iOS apps: lessons from Facebook". Adam Ernst,...
PPTX
Basic Selenium Training
PDF
Rootcon X - Reverse Engineering Swift Applications
PDF
Wahckon[2] - iOS Runtime Hacking Crash Course
PDF
Ios-training-institute-in-mumbai
PPT
Ios-training-institute-in-mumbai
PPTX
Build software like a bag of marbles, not a castle of LEGO®
Eclipse workshop presentation (March 2016)
"Architecting and testing large iOS apps: lessons from Facebook". Adam Ernst,...
Basic Selenium Training
Rootcon X - Reverse Engineering Swift Applications
Wahckon[2] - iOS Runtime Hacking Crash Course
Ios-training-institute-in-mumbai
Ios-training-institute-in-mumbai
Build software like a bag of marbles, not a castle of LEGO®

What's hot (18)

PPTX
2017 03 25 Microsoft Hacks, How to code efficiently
ODP
YAPC::NA 2007 - Epic Perl Coding
PDF
Hack in the Box GSEC 2016 - Reverse Engineering Swift Applications
PPTX
Intro To AOP
PDF
Android programming-basics
PPTX
API workshop: Deep dive into Java
KEY
OSGi, Eclipse and API Tooling
PPTX
API workshop: Introduction to APIs (TC Camp)
PDF
InvokeDynamic for Mere Mortals [JavaOne 2015 CON7682]
PPTX
Building Native Apps The Lazy Way (BeerJS 2021)
PPTX
API Design - developing for developers
PDF
iOS development best practices
PPT
Eclipse introduction IDE PRESENTATION
PPTX
Writing code samples for API/SDK documentation
KEY
Eclipse Xtend
PDF
Eclipse 40 - Eclipse Summit Europe 2010
PDF
How to Prepare for the OCPJP 8 Exam?
PDF
Software Design Patterns in Laravel by Phill Sparks
2017 03 25 Microsoft Hacks, How to code efficiently
YAPC::NA 2007 - Epic Perl Coding
Hack in the Box GSEC 2016 - Reverse Engineering Swift Applications
Intro To AOP
Android programming-basics
API workshop: Deep dive into Java
OSGi, Eclipse and API Tooling
API workshop: Introduction to APIs (TC Camp)
InvokeDynamic for Mere Mortals [JavaOne 2015 CON7682]
Building Native Apps The Lazy Way (BeerJS 2021)
API Design - developing for developers
iOS development best practices
Eclipse introduction IDE PRESENTATION
Writing code samples for API/SDK documentation
Eclipse Xtend
Eclipse 40 - Eclipse Summit Europe 2010
How to Prepare for the OCPJP 8 Exam?
Software Design Patterns in Laravel by Phill Sparks
Ad

Similar to Does The Delphi IDE Narrow You? Extend It! - ITDevConX European Delphi Conference 2019 (20)

RTF
Readme
PDF
Application Development | Delphi Review 2009
PPTX
PPTX
Delphi 1 to Delphi XE7: 20 years of Continuous Innovation by David I
PDF
Reasons to migrate from Delphi 7 to Delphi 2009
PDF
Reasons to migrate from Delphi 7 to Delphi 2009
PDF
Using Delphi as a no code development environment
PDF
DLL Tutor maXbox starter28
PDF
Build Windows Applications Fast | Delphi Features Matrix
PDF
Delphi for PHP “In Action”
PDF
Reasons to Migrate to Delphi XE
PDF
Altium script examples reference
PDF
Top Ten Reasons to Upgrade from Delphi 7
PPTX
Delphi Innovations from Delphi 1 through Delphi XE5
PPT
windows CE
PDF
EKON27_Pas2JS_sign.pdf
PDF
Pascal script maxbox_ekon_14_2
PDF
VAST 7.5 and Beyond
PPT
Auto cad 2006_api_overview
PDF
Download full ebook of Delphi 2005 Borland Software Corporation instant downl...
Readme
Application Development | Delphi Review 2009
Delphi 1 to Delphi XE7: 20 years of Continuous Innovation by David I
Reasons to migrate from Delphi 7 to Delphi 2009
Reasons to migrate from Delphi 7 to Delphi 2009
Using Delphi as a no code development environment
DLL Tutor maXbox starter28
Build Windows Applications Fast | Delphi Features Matrix
Delphi for PHP “In Action”
Reasons to Migrate to Delphi XE
Altium script examples reference
Top Ten Reasons to Upgrade from Delphi 7
Delphi Innovations from Delphi 1 through Delphi XE5
windows CE
EKON27_Pas2JS_sign.pdf
Pascal script maxbox_ekon_14_2
VAST 7.5 and Beyond
Auto cad 2006_api_overview
Download full ebook of Delphi 2005 Borland Software Corporation instant downl...
Ad

More from Marco Breveglieri (11)

PDF
Delphi & Dintorni Webinar - Diventa un mago del Testing
PDF
Delphi & Dintorni Webinar - Padroneggiare i principi SOLID con Delphi
PPTX
Creare un Information Radiator con Delphi
PPTX
"Non Aprite Quella Unit!" ovvero "Scrivere Clean Code in Delphi
PDF
REST API fantastiche e dove trovarle
PDF
Applicazioni Web ultra-performanti con Vue.js e Delphi
PDF
Create a Bot with Delphi and Telegram - ITDevCon 2016
PDF
Web Development with Delphi and React - ITDevCon 2016
PDF
Sviluppo Web con React e Delphi - Seminario Delphi Day 2016, Piacenza
PDF
Reportage Delphi Day 2012
PDF
Reportage "RAD Studio XE2 World Tour"
Delphi & Dintorni Webinar - Diventa un mago del Testing
Delphi & Dintorni Webinar - Padroneggiare i principi SOLID con Delphi
Creare un Information Radiator con Delphi
"Non Aprite Quella Unit!" ovvero "Scrivere Clean Code in Delphi
REST API fantastiche e dove trovarle
Applicazioni Web ultra-performanti con Vue.js e Delphi
Create a Bot with Delphi and Telegram - ITDevCon 2016
Web Development with Delphi and React - ITDevCon 2016
Sviluppo Web con React e Delphi - Seminario Delphi Day 2016, Piacenza
Reportage Delphi Day 2012
Reportage "RAD Studio XE2 World Tour"

Recently uploaded (20)

PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PDF
System and Network Administration Chapter 2
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
Transform Your Business with a Software ERP System
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPTX
Online Work Permit System for Fast Permit Processing
PDF
Nekopoi APK 2025 free lastest update
PDF
top salesforce developer skills in 2025.pdf
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Understanding Forklifts - TECH EHS Solution
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Odoo Companies in India – Driving Business Transformation.pdf
ManageIQ - Sprint 268 Review - Slide Deck
System and Network Administration Chapter 2
Operating system designcfffgfgggggggvggggggggg
Transform Your Business with a Software ERP System
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Online Work Permit System for Fast Permit Processing
Nekopoi APK 2025 free lastest update
top salesforce developer skills in 2025.pdf
How Creative Agencies Leverage Project Management Software.pdf
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Navsoft: AI-Powered Business Solutions & Custom Software Development
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Understanding Forklifts - TECH EHS Solution
Odoo POS Development Services by CandidRoot Solutions
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Upgrade and Innovation Strategies for SAP ERP Customers
Odoo Companies in India – Driving Business Transformation.pdf

Does The Delphi IDE Narrow You? Extend It! - ITDevConX European Delphi Conference 2019

  • 1. DOES THE DELPHI IDE NARROW YOU? EXTEND IT! Marco Breveglieri
  • 2. MARCO BREVEGLIERI Homepage: www.breveglieri.it 👈 Blog: www.compilaquindiva.com 👈 Delphi Podcast: www.delphipodcast.com 👈 ABLS TEAM Software and Web (Reggio Emilia) featuring «Leo»
  • 3. WHAT DO WE TALK ABOUT?
  • 5. Plugins have made the success of many apps. • Browsers o Mozilla Firefox o Google Chrome • CMS o Wordpress o Drupal • Developer tools o Atom o Eclipse o Visual Studio Code Sometimes, plugins are the piece of software that really matters. Plugins, plugins, plugins!
  • 6. Delphi has some really good add-ons or tools, freeware or opensource. • General purpose and coding • GExperts • ModelMaker Code Explorer (MMX) • CnPack Wizards • DDevExtensions • Documentation Insight • Castalia • Error handling • Eureka Log • madExcept • Testing and quality • Automated QA • Test Insight • Hot fixes • Delphi SpeedUp • IDE Fix Pack …and many others… 👌 But Delphi often lacks specific, targeted and «feature focused» plugin. 🤔 What about Delphi?
  • 7. What do I mean? Open Command Line Add New File Trailing Whitespace Visualizer Dummy Text Generator Show Selection Length XML, XPath & XSLT Tools Comment Remover Console Launcher Solution Cleaner PowerShell Prompt Encourage Farticus
  • 8. The only limit is the sky! Many scenarios deals with writing code, but this is not always the case. You can create • Productivity tools that add file templates and projects, refactoring and cleaning code, add new dialogs or tool windows. • Support for new syntax and languages directly in the editor. • Domain specific designers that allow you to «draw» a model and optionally produce the code (or not). • Extend debugging features • Create replacements, integrations and work arounds of limited or disliked IDE features What can I do?
  • 9. • Do things faster! • Invest more time in automation than documentation • More speed, less errors, high reliability, soft learning curve • Share your tools with colleagues or an entire community to get feedback and improvements, and also new tools • Decorate your framework with templates for projects and modules • Fix Delphi bugs or implement workarounds waiting for fixes • Last but not least… have fun! Benefits
  • 10. Nobody is perfect. Not even Delphi. What can we do? Let’s build some Experts! So what?
  • 12. • Suite of over 100 interfaces! • Let’s you interact with and control the IDE Main action lists, image lists and menus Tool bars Modules and source editors Keyboard macros and bindings Forms (and their components) Debugger and Breakpoints Code Completion Message View To-Do List Build process Project and Item Repository What is Tools API
  • 13. • All the interfaces are inside a unique code file: C:Program Files (x86)EmbarcaderoStudio20.0sourceToolsAPI.pas • You can implement some interfaces to extend the IDE • ToolsAPI provides some main kinds of extensions • Wizard a sort of setup class to easily build simple features (or host complex ones) • Notifier a class that contains logic that Delphi calls back when something interesting happens • Creator a class that supports the creation of new project, modules, units or virtually any kind of file How to use ToolsAPI
  • 14. interface uses ToolsAPI; type TFirstWizard = class(TInterfacedObject, IOTAWizard) public procedure Execute; function GetIDString: string; function GetName: string; function GetState: TWizardState; procedure AfterSave; procedure BeforeSave; procedure Destroyed; procedure Modified; end; Sample Wizard
  • 15. Where to put the code Package (.dpk) Library (.dll)
  • 16. Library (.dll) Library (.dll) • Quite «old school» solution • They must be installed via registry • Runtime packages are required! • Registration, initialization and finalization code is more complex o You have to set the Application variable o What about the Memory Manager? • Delphi loads them early (some menus to anchor to may not be available)
  • 17. • Natural container for all the elements in Delphi (types, records, classes, interfaces, routines, forms, frames, data modules, …) • Use of runtime packages is embedded • Register classes (and hence experts) is easy and straightforward • They can be installed/uninstalled «hot» and «live» directly from the IDE Where to put the code Package (.dpk)
  • 18. Demo
  • 19. • There is little… no documentation 😢 • You should refer to the comments inside «ToolsAPI.pas» • Pay attention! Your code runs inside the IDE • Delphi can crash or hang if your code misbehave or has errors • Testing is difficult, debugging even more! • If you are unsure, install the tool using a separate profile • Launch the Delphi IDE (bds.exe) as the Host Application • An effective «Code DOM» and a working parser would be appreciated • We hope that LSP support will resolve this issue and fill the gap Warning!
  • 21. NTA (Native Tools API) • Grants direct access to actual IDE objects, such as the TMainMenu object of the IDE. • The wizard must use RAD Studio packages (rtl, vcl, …). • The wizard is tied to a specific version of the IDE. Native/Open Interfaces OTA (Open Tools API) • Interfaces do not grant full access to the IDE. • All the functionality is available through OTA interfaces. • Interacting and extending the IDE occurs with the OTA layer as a mediator.
  • 22. • Services give access to specific features through interfaces. • Interfaces can be obtained from one single global variable: BorlandIDEServices. • To get a service reference, you can call the Supports() method or cast BorlandIDEServices to the required type. • Some interfaces have numbers (are versioned when changed). Tools API Services
  • 23. procedure SetKeystrokeDebugging(Debugging: Boolean); var Service: IOTAKeyboardDiagnostics; begin if Supports(BorlandIDEServices, IOTAKeyboardDiagnostics, Service) then Dialog.KeyTracing := Debugging; end; Get a service /1
  • 24. var LServices: IOTAWizardServices; begin LServices := BorlandIDEServices as IOTAWizardServices; WizardIndex := LServices.AddWizard(TFirstWizard.Create); end; begin with BorlandIDEServices as IOTAWizardServices do WizardIndex := AddWizard(TFirstWizard.Create); end; Get a service /2
  • 26. RECAP
  • 27. • Delphi (RAD Studio) Documentation http://docwiki.embarcadero.com/RADStudio/Rio/en/Extending_the_IDE_Using_the_Tools_API • Dave’s (David Hoyle) Development Blog https://www.davidghoyle.co.uk/WordPress/?page_id=667 • Stack Overflow https://stackoverflow.com/search?q=delphi+ota Resources
  • 28. Q & A

Editor's Notes

  • #3: Presentarsi molto velocemente per procedere poi con il tema principale.
  • #4: Spiegare subito qual è il tema della sessione.
  • #5: Nel talk si parlerà di creare plugin (con tutti i relativi sinonimi) per arricchire le funzionalità di Delphi. Anticipare poi la motivazione per cui si ritiene questo tema estremamente importante.
  • #6: Evidenziare come, per molti software (compreso i concorrenti di Delphi) la presenza di un fiorente marketplace di plugin disponibili aumenti l’adozione dell’ambiente di sviluppo e crei un maggiore senso di community, fino ad arrivare al caso estremo di «VSCode» dove i plugin costituiscono la parte più rilevante del software.
  • #7: Illustrare la situazione nel mondo Delphi, prevalentemente costituita da prodotti «macro», che spesso estendono l’IDE per gestire le proprie funzionalità, o nel caso di feature specifiche sono «collezioni» che a volte si sovrappongono pure e finiscono anche per ostacolarsi. Chiarire quindi qual è il tipo di estensione che si ha in mente.
  • #8: Fornire qualche esempio di plugin che sarebbe interessante avere in Delphi e che risolve problematiche molto specifiche, ma nel contempo accelerando i tempi di sviluppo e riducendo drasticamente il «time to marker», con l’unico limite della fantasia. Mostrare anche il demo del plugin «Code Smells».
  • #9: Spiegare quali sono i tipi di estensione che si possono creare e le funzionalità che possono avere (magari qualcuno non ci ha mai pensato).
  • #11: Cosa fare quindi? Introdurre il percorso esplorativo per la creazione di nuovi expert per Delphi, esortando il pubblico a farlo e, se si ottiene qualcosa di utile, condividerlo, magari proponendo uno spazio su GetIt o DCI o altrove per beneficiarne tutti.
  • #19: Creazione package, agg. riferimento a «DesignIDE», creazione classe OTAWizard.
  • #26: Fare carrellata di tutti i demo che è stato possibile produrre.