diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/CRefactory.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/CRefactory.java index 3bbcfce2558..30c94e6d0a9 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/CRefactory.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/CRefactory.java @@ -105,7 +105,8 @@ public class CRefactory { public String[] getCCppPatterns() { IContentType[] cts= Platform.getContentTypeManager().getAllContentTypes(); HashSet all= new HashSet(); - for (IContentType type : cts) { + for (IContentType candidate : cts) { + IContentType type = candidate; boolean useIt= false; while (!useIt && type != null) { String id= type.getId(); @@ -119,7 +120,7 @@ public class CRefactory { } } if (useIt) { - String exts[] = type.getFileSpecs(IContentType.FILE_EXTENSION_SPEC); + String exts[] = candidate.getFileSpecs(IContentType.FILE_EXTENSION_SPEC); all.addAll(Arrays.asList(exts)); } }