// Path: src/org/emberjs/lang/EmberJSLanguage.java
// public class EmberJSLanguage extends JSLanguageDialect {
//     public static final EmberJSLanguage INSTANCE = new EmberJSLanguage();
// 
//     protected EmberJSLanguage() {
//         super("EmberJS", DialectOptionHolder.OTHER);
//     }
// 
//     @Override
//     public String getFileExtension() {
//         return "js";
//     }
// }


import com.intellij.codeInsight.completion.CompletionContributor;
import com.intellij.codeInsight.completion.CompletionParameters;
import com.intellij.codeInsight.completion.CompletionResultSet;
import com.intellij.lang.Language;
import com.intellij.lang.javascript.completion.JSLookupUtilImpl;
import com.intellij.lang.javascript.psi.JSNamedElement;
import com.intellij.lang.javascript.psi.impl.JSReferenceExpressionImpl;
import com.intellij.lang.javascript.psi.resolve.VariantsProcessor;
import com.intellij.openapi.application.AccessToken;
import com.intellij.openapi.application.ReadAction;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiReference;
import com.intellij.psi.util.PsiUtilCore;
import com.intellij.util.Consumer;
import org.emberjs.lang.EmberJSLanguage;
import org.jetbrains.annotations.NotNull;
package org.emberjs.codeInsight;


/**
 * @author Kristian Mandrup
 */
public class EmberJSCompletionContributor extends CompletionContributor {
    private static final int EMBER_VARIABLE_PRIORITY = VariantsProcessor.LookupPriority.LOCAL_SCOPE_MAX_PRIORITY;

    @Override
    public void fillCompletionVariants(@NotNull final CompletionParameters parameters, @NotNull final CompletionResultSet result) {
// Path: src/org/emberjs/lang/EmberJSLanguage.java
// public class EmberJSLanguage extends JSLanguageDialect {
//     public static final EmberJSLanguage INSTANCE = new EmberJSLanguage();
// 
//     protected EmberJSLanguage() {
//         super("EmberJS", DialectOptionHolder.OTHER);
//     }
// 
//     @Override
//     public String getFileExtension() {
//         return "js";
//     }
// }


// Path: src/org/emberjs/codeInsight/EmberJSCompletionContributor.java
import com.intellij.codeInsight.completion.CompletionContributor;
import com.intellij.codeInsight.completion.CompletionParameters;
import com.intellij.codeInsight.completion.CompletionResultSet;
import com.intellij.lang.Language;
import com.intellij.lang.javascript.completion.JSLookupUtilImpl;
import com.intellij.lang.javascript.psi.JSNamedElement;
import com.intellij.lang.javascript.psi.impl.JSReferenceExpressionImpl;
import com.intellij.lang.javascript.psi.resolve.VariantsProcessor;
import com.intellij.openapi.application.AccessToken;
import com.intellij.openapi.application.ReadAction;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiReference;
import com.intellij.psi.util.PsiUtilCore;
import com.intellij.util.Consumer;
import org.emberjs.lang.EmberJSLanguage;
import org.jetbrains.annotations.NotNull;

package org.emberjs.codeInsight;


/**
 * @author Kristian Mandrup
 */
public class EmberJSCompletionContributor extends CompletionContributor {
    private static final int EMBER_VARIABLE_PRIORITY = VariantsProcessor.LookupPriority.LOCAL_SCOPE_MAX_PRIORITY;

    @Override
    public void fillCompletionVariants(@NotNull final CompletionParameters parameters, @NotNull final CompletionResultSet result) {
        if (!getElementLanguage(parameters).is(EmberJSLanguage.INSTANCE)) return;