About the bug: It would be good to report it on mantis (if it isn't there yet). A patch would still be welcome.
About the IdeIntf. When you patch it keep in mind that the code in the IDE is GPL, while IdeIntf is LGPL(+linking). So only interface (abstract / or empty body) should be moved.
Moving every single method, is probably overkill....
Also I am not sure what is more suitable for you:
- Modify the EditorOptions, and with that modify/overwrite the settings a user may have made (and those may be changed in the user editoroptions.xml).
- Apply your own settings to one (or some) instance(s) of the SourceEditor. For that there is SourceEditorIntf (in IdeIntf). But it probably does not yet support HL settings.
- Or maybe hook the code that translates the file extension into a highlighter. (Not sure were that code resides, probably SourceEditor[Manage] or main.pas, or project....)
About the last one:
ExtensionToLazSyntaxHighlighter is in the EditorOptsIntf. But there is no callback to hook it. (Please no OnSomething, but RegisterHandlerSomething / so more than one handler can be registered).
Also this would not just affect the editors, but also other forms (diff form / something in delphi converter / ....)
------
One more note:
IdeIntf, is to provide a LGPL interface.
The IDE code itself is GPL (and that is intended).
However, if your package is GPL, then from a license view you could use IDE code.
And afaik there is no objection to that. Only no one has bothered to add the technical ability.
IMHO breaking the IDE into packages (GPL, and in the IDE folder / clearly marked as "part of the IDE") is a good idea. Not just for access. It would also help to recompile the IDE faster.
But that is a different topic, and would require some planing.