ktexteditor and syntax-highlighting porting

Dr.-Ing. Christoph Cullmann cullmann at absint.com
Sun Jul 29 12:35:23 BST 2018


> On Sun, Jul 29, 2018 at 12:18 PM, Dr.-Ing. Christoph Cullmann
> <cullmann at absint.com> wrote:
>> Hi,
>>> On Sun, Jul 29, 2018 at 9:53 AM, Dominik Haumann <dhaumann at kde.org> wrote:
>>>> [...]
>>>> What we can add:
>>>> 1. QHash<uint16_t, Format> Definition::formatHash() const;
>>>> 2. Format Definition::format(uint16_t) const;
>>>> 3. QHash<uint16_t, Format> Repository::formatHash() const;
>>>> 4. Format Repository::format(uint16_t) const;
>>> I see an issue with 3) because Definitions are lazy-loaded.
>>> So the number of Format items may grow over time if more Definitions are loaded.
>>> So I think we should not add this.
>> as commented in the phabricator request: I would actually not do repository
>> global id's at all.
>> Or is that needed for embedded highlightings?
> From what you wrote, I had the impression that you WANT global IDs and
> you WANT to just have one lookup function for all IDs. In fact, wasn't
> that what we discussed at that time also with Volker? Globally unique
> IDs?
I think I wanted just unique id's per definition including all included definitions.
;=) But given that is 1-2 years ago, I might be confused ;=)

At least I think in our current code it is that way, that we build a unique id per
highlighting (including all included ones).

After inspecting the code, I think the issue is, that we need the global unique id,
as the inclusion works differently than in our code and the formats are not duplicated
into the definition that includes an other one.

That makes it harder to get a per highlighting vector, as we would need one that includes
all included formats, too.

But perhaps I misread the code.


----------------------------- Dr.-Ing. Christoph Cullmann ---------
AbsInt Angewandte Informatik GmbH      Email: cullmann at AbsInt.com
Science Park 1                         Tel:   +49-681-38360-22
66123 Saarbrücken                      Fax:   +49-681-38360-20
GERMANY                                WWW:   http://www.AbsInt.com
Geschäftsführung: Dr.-Ing. Christian Ferdinand
Eingetragen im Handelsregister des Amtsgerichts Saarbrücken, HRB 11234

More information about the KWrite-Devel mailing list