package com.intellij.lang.cloudslang.parsing;

import com.intellij.codeInsight.completion.*;
import com.intellij.codeInsight.lookup.LookupElementBuilder;
import com.intellij.lang.cloudslang.CloudSlangLanguage;
import com.intellij.lang.cloudslang.parsing.CloudSlangTokenTypes;
import com.intellij.patterns.PlatformPatterns;
import com.intellij.util.ProcessingContext;
import org.jetbrains.annotations.NotNull;

public class CloudSlangCompletionContributor extends CompletionContributor {

    private CloudSlangTokenTypes cloudSlangTokenTypes;

    public CloudSlangCompletionContributor() {
        extend(CompletionType.BASIC,

                PlatformPatterns.psiElement(cloudSlangTokenTypes.WHITE_SPACE).withLanguage(CloudSlangLanguage.INSTANCE),
                new CompletionProvider<CompletionParameters>() {
                    public void addCompletions(@NotNull CompletionParameters parameters,
                                               ProcessingContext context,
                                               @NotNull CompletionResultSet resultSet) {
                        resultSet.addElement(LookupElementBuilder.create("White Space Completion Hint"));
                    }
                }
        );
    }
}
@@ -490,105 +490,146 @@
    p
-rivate CloudSlangTokenTypes cloudSlangTokenTypes;%0A%0A    public CloudSlangCompletionContributor() %7B
+ublic CloudSlangCompletionContributor() throws Exception%7B%0A        CloudSlangTokenTypes cloudSlangTokenTypes = new CloudSlangTokenTypes();%0A
 %0A   
@@ -732,19 +732,24 @@
 pes.
-WHITE_SPACE
+VALUE_CHARACTERS
 ).wi

fix NPE on Completion Contributor