clarifiy APP_CONFIG deprecation note
[idea/community.git] / python / educational-python / student-python / src / com / jetbrains / edu / learning / PyStudyReferenceResolveProvider.java
1 package com.jetbrains.edu.learning;
2
3 import com.jetbrains.python.edu.PyEduUtils;
4 import com.jetbrains.python.psi.PyQualifiedExpression;
5 import com.jetbrains.python.psi.resolve.PyReferenceResolveProvider;
6 import com.jetbrains.python.psi.resolve.RatedResolveResult;
7 import org.jetbrains.annotations.NotNull;
8
9 import java.util.Collections;
10 import java.util.List;
11
12 public class PyStudyReferenceResolveProvider implements PyReferenceResolveProvider {
13   @NotNull
14   @Override
15   public List<RatedResolveResult> resolveName(@NotNull final PyQualifiedExpression element) {
16     if (StudyTaskManager.getInstance(element.getProject()).getCourse() == null) {
17       return Collections.emptyList();
18     }
19     return PyEduUtils.getResolveResultFromContainingDirectory(element);
20   }
21 }