ToolsAPI is the API for extending and customizing the Delphi IDE using interfaces.
Questions tagged [toolsapi]
61 questions
1
vote
1 answer
How to get the main source file name from an IOTAProject?
Since at least D2007 a project file can have a main source file with differing base name. The DevExpress demos make use of this: E.g. there is a single dpr file UnboundListDemo.dpr which serves as the main source for both UnboundListDemoD11.dproj…

Uli Gerhardt
- 13,748
- 1
- 45
- 83
1
vote
0 answers
Can I use a real object that implements ToolsAPI's IOTAEditPosition in a DUnit test?
I'm writing a set of wizards to enhance source code editing in the IDE and the text manipulation is done through IOTAEditPosition which I get from BorlandIDEServices.
How can I automate tests against my methods so I can assert that the text…

Rafael Piccolo
- 2,328
- 1
- 18
- 29
1
vote
0 answers
Can I interrupt form's setting before it show on Delphi IDE?
When I open a Delphi form's pas file, it will show the GUI form designer. It there any way to get notify via Tools API just before the form show in IDE and let me modify properties of form? Also is there similar notifier when I execute "View as…

Chau Chee Yang
- 18,422
- 16
- 68
- 132
0
votes
2 answers
How to catch coordinates of mouse cursor (IDE Delphi) to invoke Context Menu
How to catch coordinates of mouse cursor (IDE Delphi) when I invoke Context Menu to create a new control?
I'd like to create a new control via Context Menu at same coordinates where Context Menu was invoked.
I'm creating my own component editor to…

Cicero
- 11
- 2
0
votes
0 answers
Using IOTAComponent at runtime
How can I use IOTAComponent in runtime? I need some methods to use in similar mode at runtime that I saw working at design time.
0
votes
0 answers
Getting OleVariant (TClientDataset.Data) from Evaluator
Is it possible to evaluate an OleVariant of type varArray (Data of TClientDataset) using Delphi evaluator? I'm trying to build a Debugger Visualizer, using ToolsApi, for this kind of type. I work in an application that uses this extensively to…

Rodrigo Caetano
- 379
- 1
- 13
0
votes
1 answer
How to retrieve the value of Environment Variables using OpenTools API?
I added some new environment variables in the IDE setup:
Tools > Options > Environment Options > Environment Variables > User Overrides
Those are just some paths like: $(MYPROJ_ROOT)\Source.
How can I retrieve one of them using the OpenTools…

Ali Dehban
- 88
- 1
- 8
0
votes
1 answer
Can I revert the changes of a Delphi XE project by Toolsapi?
I am writing Delphi XE expert. The expert switch the build configuration from "debug" to "release", perform build and switch back to "release" back to "debug".
While switch the build configuration, only the .dproj file has modified. The project…

Chau Chee Yang
- 18,422
- 16
- 68
- 132
0
votes
0 answers
IOTAHighlighter not calling Tokenize
I'm trying to write a simple highlighter (which adds highlighting a certain kind of variable in a pas-file)
I used the code in http://www.delphi-central.com/syntax_highlighting.aspx
problem is that the Tokenize procedure is never called.
It does get…

frank
- 1
- 3
0
votes
0 answers
Delphi Expert: How to register IOTAEditorNotifier callback
I am writing a Delphi IDE expert (OpenToolsAPI). I want to receive callbacks for the IOTAEditorNotifier interface.
IOTAEditorNotifier = interface(IOTANotifier)
['{0E3B9D7B-E119-11D1-AB0C-00C04FB16FB3}']
{ Called when a new edit view is…

Ranga B.
- 627
- 10
- 20
0
votes
1 answer
How to preserve code folding when formatting source
See also this question: How do I avoid expanding folded regions when I invoke the code formatter?
This is not a dupe, because I'm interested in solving the problem using the ToolsApi.
When I press CTRL + D the code formats nicely (mostly).
But…

Johan
- 74,508
- 24
- 191
- 319
0
votes
1 answer
How to add a target platform to a Delphi Project via the OpenTools API
In Delphi (XE2 through to XE5), how can one programmatically add a target platform to a project?
By "programmatically", I mean through the OpenTools API, as opposed to a transform of the .dproj file. This is to be done inside an IDE…

Sean B. Durkin
- 12,659
- 1
- 36
- 65
0
votes
0 answers
Replace manifest during compilation
I want to create IDE extension which allows me to edit Windows manifest directly in Delphi IDE. Is there a way to delete build in manifest and add my own resource without {$R} directive? All my tryings with IOTAProjectResource were failed. I even…

Denis Anisimov
- 3,297
- 1
- 10
- 18
0
votes
1 answer
Delphi, Editor for Button, preserve default click in IDE
XE3 Prof, Win64.
I created a new Button component, based on TButton.
It have a special menu in IDE, named "Set Button Style".
procedure Register;
begin
RegisterComponents('SComps', [TSAButton]);
RegisterComponentEditor(TSAButton,…

durumdara
- 3,411
- 4
- 43
- 71
0
votes
2 answers
What do I do about a missing LibIntf.pas file?
I'm trying to recompile an old Deplhi 5 project but I'm receiving a fatal error saying some of the files are missing.
I've found around 20-25 of the missing components on the Internet, but can't seem to find "LibIntf.pas". Where abouts can I find or…

user1597788
- 13
- 1