Questions tagged [otapi]

The Open Tools API is a plugin API exposed by the Delphi and C++ Builder IDE, allowing the IDE to host plugins.

The Open Tools API is a plugin API exposed by the Delphi and C++ Builder IDE. It allows plugins to access much of the IDE's internal functionality, add wizards and menu items, etc.

18 questions
6
votes
2 answers

How do I get the version number of the current project using ToolsAPI in Delphi 10.2

In Delphi 2007 I can easily get the version information of the current project using the following ToolsAPI calls: procedure Test; var ProjectOptions: IOTAProjectOptions; Project: IOTAProject; Major: Variant; Minor: Variant; Release:…
dummzeuch
  • 10,975
  • 4
  • 51
  • 158
5
votes
2 answers

How do I add the key binding Shift+Ctrl+H X to the Delphi IDE using the ToolsApi?

Adding a new ShortCut to the Delphi IDE is not too difficult because the Open Tools API provides a service for this. I am trying something apparently more complex: Add a Wordstar like additional ShortCut: I want something to happen when the user…
dummzeuch
  • 10,975
  • 4
  • 51
  • 158
3
votes
0 answers

How to refresh Delphi IDE after applying a different value IDE SizeFont using ToolsApi?

I'm trying to refresh my IDE after applying a new font size. The code is: procedure TEditorFontSizeController.ChangeFontSize(Delta: Integer); var IdeServices: IOTAServices; EnvironmentOptions: IOTAEnvironmentOptions; CurValue: Integer; …
Rodrigo Farias Rezino
  • 2,687
  • 3
  • 33
  • 60
3
votes
1 answer

Return the library path of a specific platform using OTA

I want to get the library path for a specific platform (win32, win64, OSx). But, when I ask for the library path for, OTA just return me the OSx library path. The code is: EnvironmentOptions := (BorlandIDEServices as…
Rodrigo Farias Rezino
  • 2,687
  • 3
  • 33
  • 60
3
votes
1 answer

How to show ActionList editor from custom TComponentEditor at design time

I have a TComponentEditor descendant which I register for TActionList to offer some customized options. Back in D2007 I could show the default ActionList editor by calling ShowActionListDesigner from the unit ActnEdit. Adding designide.dcp to the…
msohn
  • 326
  • 2
  • 12
3
votes
1 answer

How can I keep track of code folding in the code editor?

I am writing a plugin that marks specific lines, and will be trying to paint a highlight marker for specific lines over the code editor. To do this, I need to calculate the position onscreen of specific lines of code, ie rows in the buffer. The…
David
  • 13,360
  • 7
  • 66
  • 130
2
votes
0 answers

How can I keep track of editor modifications and line position changes in the IDE?

I am writing an IDE plugin that tracks specific lines - consider it similar to the IDE's inbuilt bookmark functionality. When a user edits source code, the position of a specific line changes - what might have been line 100 becomes line 101 when…
David
  • 13,360
  • 7
  • 66
  • 130
2
votes
1 answer

Is there a way to access (add, remove, and navigate to) IDE bookmarks with the OTAPI?

The Delphi IDE allows extensions and plugins via the Open Tools API (OTAPI). It's not very well documented and I am not sure where to look to find out a comprehensive list of what the API allows access to and can achieve, apart from browsing…
David
  • 13,360
  • 7
  • 66
  • 130
1
vote
0 answers

Delphi IDE Expert - intercept "View Source" or DPR-file loading

Trying to tune AutoOpenUnit IDE Expert (implementing I-OTA-IDE-Notifier and implementing FileNotification event) for my Delphi XE2 I stumbled upon a problem... I need to scan every source file opened by Code Editor (or by IDE itself). I made a test…
Arioch 'The
  • 15,799
  • 35
  • 62
1
vote
0 answers

Delphi [find declaration] using OTA

I am working on an IDE expert in D10 Seattle, and can't figure out how to access "Find Declaration" (aka Ctrl+Click) in code. I need to use it in my own keybinding so I can drop a breadcrumb first. If it's not available, is there a workaround by…
mether
  • 11
  • 1
1
vote
1 answer

How create a inheritable custom form from package by Object Repository on Delphi?

I've created a wizard for creating a custom form. It's working normal. I can create it from the File> Other> 'MyWizards' menu. But, I would like to add the common options of forms and dialogs: "Use", "Inherit" and "Copy". How to do this? Is there…
AnselmoMS
  • 467
  • 3
  • 18
1
vote
0 answers

Can the Option Set file for Delphi 10 be set programmatically using the OTAPI?

Is it possible to automate setting the Option Set file reference programmatically when creating a new Delphi project using the IOTAProjectOptions respectively IOTAProjectOptionsConfigurations interface1? Or can I do that using any of the other OTAPI…
user0042
  • 7,917
  • 3
  • 24
  • 39
1
vote
1 answer

How to get the specific line string (UTF8) or specific line string length in source editor using OpenToolsAPI

I want to fetch the entire line string (UTF8) and want to do operation on the line string. I have tried following code. but if we are having multibyte characters am not able to do this. J:=1; CurrentRowStr :=''; while True do begin …
Sumit Chourasia
  • 2,394
  • 7
  • 30
  • 57
1
vote
0 answers

How to get list of objects accessible to a project?

I'm trying to figure out how to access a list of objects available in the Delphi IDE (ie., from different namespaces) from within a component editor. (Also from the same editor form running independently.) LiveBindings do it, and there's a video…
David Schwartz
  • 1,756
  • 13
  • 18
1
vote
1 answer

Is it possible to invoke refactoring from the Open Tools API?

The Delphi IDE has a plugin system, the Open Tools API. The IDE also has a number of refactorings available, such as a rename refactoring to rename a field, method, etc - an identifier. Is it possible to invoke this, or any, refactorings from the…
David
  • 13,360
  • 7
  • 66
  • 130
1
2