mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-12564 Django: Template directories auto-configuration is missing on opening existing project
PY-12876 Jinja2 Unresolved template reference
This commit is contained in:
@@ -17,7 +17,6 @@ package com.jetbrains.python.fixtures;
|
||||
|
||||
import com.google.common.base.Joiner;
|
||||
import com.intellij.codeInsight.intention.IntentionAction;
|
||||
import com.intellij.codeInsight.lookup.LookupElement;
|
||||
import com.intellij.codeInspection.LocalQuickFix;
|
||||
import com.intellij.codeInspection.ex.QuickFixWrapper;
|
||||
import com.intellij.execution.actions.ConfigurationContext;
|
||||
@@ -42,8 +41,10 @@ import com.intellij.openapi.roots.ModifiableRootModel;
|
||||
import com.intellij.openapi.roots.OrderRootType;
|
||||
import com.intellij.openapi.roots.impl.FilePropertyPusher;
|
||||
import com.intellij.openapi.roots.libraries.Library;
|
||||
import com.intellij.openapi.util.Ref;
|
||||
import com.intellij.openapi.vfs.LocalFileSystem;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.platform.DirectoryProjectConfigurator;
|
||||
import com.intellij.psi.*;
|
||||
import com.intellij.psi.search.searches.ReferencesSearch;
|
||||
import com.intellij.refactoring.RefactoringActionHandler;
|
||||
@@ -303,6 +304,20 @@ public abstract class PyTestCase extends UsefulTestCase {
|
||||
handler.invoke(myFixture.getProject(), editor, myFixture.getFile(), ((EditorEx)editor).getDataContext());
|
||||
}
|
||||
|
||||
/**
|
||||
* Configures project by some path. It is here to emulate {@link com.intellij.platform.PlatformProjectOpenProcessor}
|
||||
*
|
||||
* @param path path to open
|
||||
* @param configurator configurator to use
|
||||
*/
|
||||
protected void configureProjectByProjectConfigurators(@NotNull final String path,
|
||||
@NotNull final DirectoryProjectConfigurator configurator) {
|
||||
final VirtualFile newPath =
|
||||
myFixture.copyDirectoryToProject(path, String.format("%s%s%s", "temp_for_project_conf", File.pathSeparator, path));
|
||||
final Ref<Module> moduleRef = new Ref<Module>(myFixture.getModule());
|
||||
configurator.configureProject(myFixture.getProject(), newPath, moduleRef);
|
||||
}
|
||||
|
||||
protected static class PyLightProjectDescriptor implements LightProjectDescriptor {
|
||||
private final String myPythonVersion;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user