mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Rename local variables in macro-bodies, bug 232091.
This commit is contained in:
parent
29ab26de00
commit
dfa9e3618c
1 changed files with 7 additions and 4 deletions
|
@ -52,6 +52,8 @@ public class CRenameLocalProcessor extends CRenameProcessorDelegate {
|
||||||
@Override
|
@Override
|
||||||
protected void analyzeTextMatches(ArrayList<CRefactoringMatch> matches, IProgressMonitor monitor,
|
protected void analyzeTextMatches(ArrayList<CRefactoringMatch> matches, IProgressMonitor monitor,
|
||||||
RefactoringStatus status) {
|
RefactoringStatus status) {
|
||||||
|
|
||||||
|
super.analyzeTextMatches(matches, monitor, status);
|
||||||
if (fScope != null) {
|
if (fScope != null) {
|
||||||
CRefactoringArgument argument = getArgument();
|
CRefactoringArgument argument = getArgument();
|
||||||
ASTManager r = getAstManager();
|
ASTManager r = getAstManager();
|
||||||
|
@ -76,12 +78,13 @@ public class CRenameLocalProcessor extends CRenameProcessorDelegate {
|
||||||
int[] range= result;
|
int[] range= result;
|
||||||
for (Iterator<CRefactoringMatch> iter = matches.iterator(); iter.hasNext();) {
|
for (Iterator<CRefactoringMatch> iter = matches.iterator(); iter.hasNext();) {
|
||||||
CRefactoringMatch m = iter.next();
|
CRefactoringMatch m = iter.next();
|
||||||
int off= m.getOffset();
|
if (m.getAstInformation() != CRefactoringMatch.AST_REFERENCE) {
|
||||||
if (off < range[0] || off > range[1]) {
|
int off= m.getOffset();
|
||||||
iter.remove();
|
if (off < range[0] || off > range[1]) {
|
||||||
|
iter.remove();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
super.analyzeTextMatches(matches, monitor, status);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue