1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-31 12:55:40 +02:00

Bug 360030 - Support refactroing on files with custom content types

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>
This commit is contained in:
Eugene Ostroukhov 2012-03-07 18:01:54 -08:00 committed by Sergey Prigogin
parent 890eea5813
commit 1f6a9956f2

View file

@ -105,7 +105,8 @@ public class CRefactory {
public String[] getCCppPatterns() { public String[] getCCppPatterns() {
IContentType[] cts= Platform.getContentTypeManager().getAllContentTypes(); IContentType[] cts= Platform.getContentTypeManager().getAllContentTypes();
HashSet<String> all= new HashSet<String>(); HashSet<String> all= new HashSet<String>();
for (IContentType type : cts) { for (IContentType candidate : cts) {
IContentType type = candidate;
boolean useIt= false; boolean useIt= false;
while (!useIt && type != null) { while (!useIt && type != null) {
String id= type.getId(); String id= type.getId();
@ -119,7 +120,7 @@ public class CRefactory {
} }
} }
if (useIt) { if (useIt) {
String exts[] = type.getFileSpecs(IContentType.FILE_EXTENSION_SPEC); String exts[] = candidate.getFileSpecs(IContentType.FILE_EXTENSION_SPEC);
all.addAll(Arrays.asList(exts)); all.addAll(Arrays.asList(exts));
} }
} }