[KDevelop/PHP] fix rename of a variable
Needs ReviewPublic

Authored by hmitonneau on Thu, Nov 28, 10:29 AM.
This revision needs review, but there are no reviewers specified.



Renaming a variable doesn't work.
This is because in KDevelop::DocumentChangeSetPrivate::generateNewText, rangeText(change.m_range, textLines) return the value $oldname and change.m_oldText has the value oldname

This patch modify the parser to remove the "$" in the range of variable identifiers. As a result, we can now rename a variable, but as a side effect, the "$" is no more highlighted with the variable (the "$" are always blue, and do not take color of the variable)

Test Plan

Right-click on a variable
Select "Rename xxx..."
Choose a new name and click "Rename"

All the occurrences of the variable must be renamed

Diff Detail

R52 KDevelop: PHP Support
Lint Skipped
Unit Tests Skipped
hmitonneau created this revision.Thu, Nov 28, 10:29 AM
Restricted Application added a subscriber: kdevelop-devel. ยท View Herald TranscriptThu, Nov 28, 10:29 AM
hmitonneau requested review of this revision.Thu, Nov 28, 10:29 AM