1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2010-10-05 06:16:16 +00:00
parent 927436127c
commit a10ba4bd8b

View file

@ -28,7 +28,6 @@ import org.eclipse.cdt.internal.core.parser.token.KeywordSets;
* @since 5.1
*/
public class CLanguageKeywords implements ICLanguageKeywords {
private final ParserLanguage language;
private final IScannerExtensionConfiguration config;
@ -37,7 +36,6 @@ public class CLanguageKeywords implements ICLanguageKeywords {
private String[] builtinTypes = null;
private String[] preprocessorKeywords = null;
/**
* @throws NullPointerException if either parameter is null
*/
@ -51,11 +49,9 @@ public class CLanguageKeywords implements ICLanguageKeywords {
this.config = config;
}
public String[] getKeywords() {
if (keywords == null) {
Set<String> keywordSet = new HashSet<String>(KeywordSets.getKeywords(KeywordSetKey.KEYWORDS, language));
CharArrayIntMap additionalKeywords = config.getAdditionalKeywords();
if (additionalKeywords != null) {
for (Iterator<char[]> iterator = additionalKeywords.toList().iterator(); iterator.hasNext(); ) {
@ -68,8 +64,6 @@ public class CLanguageKeywords implements ICLanguageKeywords {
return keywords;
}
public String[] getBuiltinTypes() {
if (builtinTypes == null) {
Set<String> types = KeywordSets.getKeywords(KeywordSetKey.TYPES, language);
@ -78,7 +72,6 @@ public class CLanguageKeywords implements ICLanguageKeywords {
return builtinTypes;
}
public String[] getPreprocessorKeywords() {
if (preprocessorKeywords == null) {
Set<String> keywords = new HashSet<String>(KeywordSets.getKeywords(KeywordSetKey.PP_DIRECTIVE, language));
@ -93,6 +86,4 @@ public class CLanguageKeywords implements ICLanguageKeywords {
}
return preprocessorKeywords;
}
}