cmake: fix detecting ids with digits inside on a cursor position
ClosedPublic

Authored by kossebau on Oct 2 2018, 11:34 PM.

Details

Summary

CMakeManager::specialLanguageObjectNavigationWidget() implementation was
only checking for letters and _, thus not properly detecting ids with digits
inside, e.g. the CMPxxxx policy ids.

Test Plan

Hovering over "CMP0071" in a CMakeLists.txt or presseing Alt now triggers
the navigation widget with the respective documentation.
Doing the same for CMake functions and variables still works as before

Diff Detail

Repository
R32 KDevelop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kossebau created this revision.Oct 2 2018, 11:34 PM
Restricted Application added a project: KDevelop. · View Herald TranscriptOct 2 2018, 11:34 PM
Restricted Application added a subscriber: kdevelop-devel. · View Herald Transcript
kossebau requested review of this revision.Oct 2 2018, 11:34 PM

A bit sad i blew up the code here. But then when I first looked at the code I was wondering about all the corner cases, so being a bit more explicit might not hurt. Moving into separate method at least helps keeping the actual method small and understandable.
Second while loop done to be consistent a bit with first one, undecided wheter another loop would be better, so looking for opinions here :)

apol accepted this revision.Oct 3 2018, 8:49 AM

Looks good, thanks!

This revision is now accepted and ready to land.Oct 3 2018, 8:49 AM
This revision was automatically updated to reflect the committed changes.