1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-29 03:45:35 +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 * @since 5.1
*/ */
public class CLanguageKeywords implements ICLanguageKeywords { public class CLanguageKeywords implements ICLanguageKeywords {
private final ParserLanguage language; private final ParserLanguage language;
private final IScannerExtensionConfiguration config; private final IScannerExtensionConfiguration config;
@ -37,7 +36,6 @@ public class CLanguageKeywords implements ICLanguageKeywords {
private String[] builtinTypes = null; private String[] builtinTypes = null;
private String[] preprocessorKeywords = null; private String[] preprocessorKeywords = null;
/** /**
* @throws NullPointerException if either parameter is null * @throws NullPointerException if either parameter is null
*/ */
@ -51,11 +49,9 @@ public class CLanguageKeywords implements ICLanguageKeywords {
this.config = config; this.config = config;
} }
public String[] getKeywords() { public String[] getKeywords() {
if (keywords == null) { if (keywords == null) {
Set<String> keywordSet = new HashSet<String>(KeywordSets.getKeywords(KeywordSetKey.KEYWORDS, language)); Set<String> keywordSet = new HashSet<String>(KeywordSets.getKeywords(KeywordSetKey.KEYWORDS, language));
CharArrayIntMap additionalKeywords = config.getAdditionalKeywords(); CharArrayIntMap additionalKeywords = config.getAdditionalKeywords();
if (additionalKeywords != null) { if (additionalKeywords != null) {
for (Iterator<char[]> iterator = additionalKeywords.toList().iterator(); iterator.hasNext(); ) { for (Iterator<char[]> iterator = additionalKeywords.toList().iterator(); iterator.hasNext(); ) {
@ -68,8 +64,6 @@ public class CLanguageKeywords implements ICLanguageKeywords {
return keywords; return keywords;
} }
public String[] getBuiltinTypes() { public String[] getBuiltinTypes() {
if (builtinTypes == null) { if (builtinTypes == null) {
Set<String> types = KeywordSets.getKeywords(KeywordSetKey.TYPES, language); Set<String> types = KeywordSets.getKeywords(KeywordSetKey.TYPES, language);
@ -78,7 +72,6 @@ public class CLanguageKeywords implements ICLanguageKeywords {
return builtinTypes; return builtinTypes;
} }
public String[] getPreprocessorKeywords() { public String[] getPreprocessorKeywords() {
if (preprocessorKeywords == null) { if (preprocessorKeywords == null) {
Set<String> keywords = new HashSet<String>(KeywordSets.getKeywords(KeywordSetKey.PP_DIRECTIVE, language)); Set<String> keywords = new HashSet<String>(KeywordSets.getKeywords(KeywordSetKey.PP_DIRECTIVE, language));
@ -93,6 +86,4 @@ public class CLanguageKeywords implements ICLanguageKeywords {
} }
return preprocessorKeywords; return preprocessorKeywords;
} }
} }