How do I add my own items to the Delphi Options dialog (Tools\Options)? For example, see the Project JEDI options.
For example it is necessary for me that there there was my bookmark with options of compilation for mine a component and new projects.
For example there is at me a new project, in it the panel and on it 3 checkboxes how it there to add?
The key to this are the INTAEnvironmentOptionsServices and INTAAddInOptions interfaces. Support for add-ins customising the options dialog was added to the Tools API in XE. Your add-in needs to supply an implementation of INTAAddInOptions. You register the add-in options by calling INTAEnvironmentOptionsServices.RegisterAddInOptions.
If you can't work out how to do this from the Tools API source code then I suggest you download the JCL source code to use as your template.
Uwe Schuster's blog article on the subject gives a general overview but I can't find any other articles that cover this topic.
Related
Does the IDE display the current Procedure or Function that the cursor is inside of? If I search for myVariable is there any way to know (without having to scroll up) which function I landed inside of?
If it is not native are there any plugins that support this feature?
This functionality is not available in the IDE itself.
The an open-source CNPack Wizards have this functionality. See the images below, particularly the highlighted areas of the toolbar and code editor window. (Image from Delphi 2007 IDE, but CNWizards support later versions of Delphi up to and including XE5.)
It works with code that contains procedural (non-OOP) code as well. Here are two captures of separate procedural functions/procedures, with the relevant portions of the toolbar and code editor highlighted:
Castalia has this feature, among other things.
Since it is not an existing IDE functionality, various 3rd party tool providers have added it to their product.
On the list of existing tools is ModelMaker Code Explorer.
On the list of past tools, I'd like to add CodeRush as it was among the first to implement it. A screenshot can be found here (scroll down a bit).
What is dclsmpedit package (Embarcadero Editor Script Enhancements)?
Do I need it?
I am not sure what 'Editor Script Enhancements' does.
It's a sample of adding key bindings (your own code editor keyboard assignments), the ability to save keyboard macros (keystrokes recorded for playback), and an edit buffer list to the IDE using the ToolsAPI. You only need it if you want to use it 's functionality. The source is useful if you want to extend the IDE via the parts of the ToolsAPI that they demonstrate. The key binding functionality in BufferList.pas implements the New IDE Classic key mapping in the IDE itself (as pointed out by #LURD in the comment below).
If you're using Delphi 2007, you can find the source in the Delphi Demos folder (by default on Windows 7 in C:\Users\Public\Documents\RAD Studio\5.0\Demos\DelphiWin32\VCLWin32\ToolsAPI\Edit Keybinding), and more easily found with the Start->CodeGear RAD Studio->Samples menu item. The source for the added functionality is there as well, so you can see what they do and how they are implemented.
In XE3, the source code can be found in C:\Users\Public\Documents\RAD Studio\10.0\Samples\Delphi\VCL\ToolsAPI\Editor KeyBinding, or via Start->All Programs->Embarcadero RAD Studio XE->Samples.
Where I can find DeskUtil documentation/help? I am trying to build Delphi add-in and I have some troubles with saving/registering/loading the add-in docking form into the active IDE desktop. I am using the DeskUtil methods after reading some examples here and there, but, examples don’t go deep in how these methods work, and in the mechanism of the IDE loading/destroying. Is there any official documentation/help about the DeskUtil or the OpenTools Api? In other words, how and where can developer like me get deep knowledge (not articles or demos) about IDE and OpenTools Api?
Thanks for your help.
You can have a look at the GExperts "Erik's Open Tools API FAQ" and also search for examples in the GExperts code.
Also see articles by Allen Bauer:
Opening Doors: Notes On the Delphi ToolsAPI by its Creator
Opening Doors: Notes On the Delphi ToolsAPI by its Creator - Part 2
Opening Doors: Getting Inside the IDE
Units and Forms required to create Dockable IDE Forms
Are there examples and resources (source code and documentation) available which show how a 'New xyz Application' or 'New xyz Document' wizard can be created with Delphi which then will appear in the new project / new file dialog of the Delphi IDE?
What I want to do: for some of my libraries I would like to add a new project type and a new file type to the IDE dialogs, which will guide the developer through a wizard and then create some customized auto-generated source code.
So far I found this short overview:
Experts and Wizards in Delphi
And this article
OTA: Visual design of Wizards
Note that this question is not about wizard or GUI creation in general but on how the Delphi IDE can be extended to include my own new project / file type dialogs. The new project and file types should appear in the new file or new project type dialog in the matching category (or even a new one).
The source code for the "Visual design of Wizards" article is here.
That code in itself is an example of what you're asking for, but it can also be used to create your "creators" by writing less code and designing more in the IDE object inspector.
Basically, to have a new source file item for Delphi's "New Items" dialog you need to implement IOTAModuleCreator ; for a new project item you need to implement IOTAProjectCreator. You can even implement IOTAProjectGroupCreator to add an item which will create a whole project group with several projects at once.
Your implementors of these interfaces should generate the source code and return it to the IDE via an implementation of IOTAFile interface. ToolsAPI already contains TOTAFile class which you can easily use by passing it a string of the whole contents of the new file. This will create an unnamed file in memory which the user can then save to hard disk and give it a file name.
You can also find more information by following the links in Zarko's article.
Also see the ToolsAPI unit where the interfaces are declared. There are also some explanations in the comments.
You can try the JvWizard from the JVCL Components.
you can check an example of use here (translated page)
alt text http://vingrad.ru/blogs/bose/files/2008/12/image26.png
Bye.
HI,
I want to write a small Delphi IDE Expert for D2007-D2009 (aka. Galileo IDE) in order to show a window with a TMemo instance on it, with all the component names and classes from the form designer in the above memo. The selected component will be marked with a '*'. The expert should appear on a menu/toolbar and have a shortcut assigned.
How do I do?
Ps: Actually the real code is more complicated than that, but I want to have a general framework to get started.
TIA
I did my first OTA with help of these links:
Erik's Open Tools API FAQ and Resources (The author of GExpert)
Delphi Open Tools API from Jim Kueneman - Mustangpeak
Delphi Open Tools API from RayRay Lischner
They are not updated to the latest versions, but they will you good start point and most of the code will work with the last version, I tried them with D2007.
There are links to articles describing how to write an OTA plug-in here:
http://delphi.about.com/od/objectpascalide/a/wizardsexperts.htm