summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Ostroukhov2012-03-07 21:01:54 (EST)
committer Sergey Prigogin2013-04-23 19:11:33 (EDT)
commit1f6a9956f204e25466182c099a3b169186ed6a7f (patch)
tree5109e87aafbb0f00637152029875d0ce6e1bc89a
parent890eea5813bb961b2c562737f366f9ea6dfcb075 (diff)
downloadorg.eclipse.cdt-1f6a9956f204e25466182c099a3b169186ed6a7f.zip
org.eclipse.cdt-1f6a9956f204e25466182c099a3b169186ed6a7f.tar.gz
org.eclipse.cdt-1f6a9956f204e25466182c099a3b169186ed6a7f.tar.bz2
Bug 360030 - Support refactroing on files with custom content typesrefs/changes/12/12112/3
Change-Id: I7cb50d90c9e49a48a833c52dd9f09b54de0dfac4 Reviewed-on: https://git.eclipse.org/r/12112 Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com> IP-Clean: Sergey Prigogin <eclipse.sprigogin@gmail.com> Tested-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/refactoring/rename/CRefactory.java5
1 files changed, 3 insertions, 2 deletions
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 3bbcfce..30c94e6 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<String> all= new HashSet<String>();
- 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));
}
}