22

I would like to modify class completion so that every method that is created contains a raise ENotImplemented.Create;

Does anybody know how to customize this behavior?

update:
I would like solution that is not dependent on a third parties.
From where does the IDE take its templates?
Is there a way through OTA?

Tobias R
  • 928
  • 8
  • 22
  • 1
    See this: [delphi-ide-how-to-change-the-way-class-completion-works](http://stackoverflow.com/a/581386/576719). With ModelMaker Code Explorer (MMX) you will have an option to do what you want. – LU RD Mar 12 '12 at 09:44
  • 1
    @RBA, ugh! You've posted the same link as LU RD. – OnTheFly Mar 12 '12 at 12:53
  • I did not noticed. I deleted that comment – RBA Mar 12 '12 at 13:29
  • Thanks for the link. But I'm actually hoping for a more "IDE included" solution. – Tobias R Mar 12 '12 at 14:02
  • Then you will have to roll your own by the Delphi Tools and the IotaCodeCompletionServices interface. – LU RD Mar 12 '12 at 14:53
  • Here is a link: http://docwiki.embarcadero.com/RADStudio/XE2/en/Obtaining_Tools_API_Services – LU RD Mar 12 '12 at 14:58
  • Sounds promising, although I can't find more than the Help-Entry. The Interface definition is not in ToolsApi.pas do you have more information on that? – Tobias R Mar 12 '12 at 20:20
  • I am really interested on this also. – Rafael Colucci Mar 13 '12 at 13:08
  • As a general introduction, see [Introduction-to-the-Delphi-Open-Tools-API](http://www.sdn.nl/SDN/Artikelen/tabid/58/view/View/ArticleID/3157/Introduction-to-the-Delphi-Open-Tools-API.aspx). Other than what's in ToolsApi.pas and a few samples like [Productivity_Sample](http://docwiki.embarcadero.com/CodeExamples/XE2/en/VCL.Productivity_Sample) and a link to [GExperts](http://www.gexperts.org/) where lots of code and examples using Tools Api can be found, I have not seen any documentation how to implement the `IotaCodeCompletionServices`. – LU RD Mar 21 '12 at 22:39
  • Thanks for the links, but my problem is that there is no Information on IotaCodeCompletionServices. I guess its an Documentation Bug. – Tobias R Mar 22 '12 at 08:05

1 Answers1

3

The simple answer is that there is no way to actually modify the markup generated by RAD Studio's (Delphi/C++ Builder) Class Completion engine. I have exhaustively attempted to do this, to no avail.

I am told (from a very reliable source) that the Class Completion engine is hard-coded into the IDE, rather than templated, with no intended interface exposed through the Open Tools API to change its behaviour.

The best alternative solution is ModelMaker Code Explorer (be sure not to accidentally order "ModelMaker" instead as this is a totally different piece of kit). As I understand it, ModelMaker Code Explorer essentially overrides the built-in Class Completion engine with its own, and provides the necessary exposure to customize the code markup as you require.

LaKraven
  • 5,804
  • 2
  • 23
  • 49
  • can you quote some official sources and the like ? – CyprUS May 07 '12 at 06:17
  • I shall ask my sources for permission... but I won't quote them without their permission (not sure if they told me this in some form of confidence or not) – LaKraven May 07 '12 at 06:21