diff --git a/src/main/java/fr/adrienbrault/idea/symfony2plugin/assetMapper/AssetMapperUtil.java b/src/main/java/fr/adrienbrault/idea/symfony2plugin/assetMapper/AssetMapperUtil.java index 1c4f28c48..71b4b9a48 100644 --- a/src/main/java/fr/adrienbrault/idea/symfony2plugin/assetMapper/AssetMapperUtil.java +++ b/src/main/java/fr/adrienbrault/idea/symfony2plugin/assetMapper/AssetMapperUtil.java @@ -196,11 +196,6 @@ private static Collection getModuleReferences(@NotNull String modul return files; } - @NotNull - public static Collection getModuleReferences(@NotNull Project project, @NotNull String module) { - return getModuleReferences(module, AssetMapperUtil.getMappingFiles(project)); - } - @NotNull public static Collection getEntrypointModuleReferences(@NotNull Project project, @NotNull String module) { List collect = getEntrypointMappings(project).stream().filter(module1 -> module1.key().equals(module)).collect(Collectors.toList()); diff --git a/src/main/java/fr/adrienbrault/idea/symfony2plugin/assetMapper/references/AssetMapperModuleReferenceContributor.java b/src/main/java/fr/adrienbrault/idea/symfony2plugin/assetMapper/references/AssetMapperModuleReferenceContributor.java deleted file mode 100644 index 2b1e9db59..000000000 --- a/src/main/java/fr/adrienbrault/idea/symfony2plugin/assetMapper/references/AssetMapperModuleReferenceContributor.java +++ /dev/null @@ -1,49 +0,0 @@ -package fr.adrienbrault.idea.symfony2plugin.assetMapper.references; - -import com.intellij.codeInsight.lookup.LookupElement; -import com.intellij.lang.javascript.frameworks.modules.JSResolvableModuleReferenceContributor; -import com.intellij.lang.javascript.psi.resolve.JSResolveResult; -import com.intellij.openapi.vfs.VirtualFile; -import com.intellij.psi.PsiElement; -import com.intellij.psi.ResolveResult; -import fr.adrienbrault.idea.symfony2plugin.Symfony2ProjectComponent; -import fr.adrienbrault.idea.symfony2plugin.assetMapper.AssetMapperUtil; -import fr.adrienbrault.idea.symfony2plugin.util.PsiElementUtils; -import org.jetbrains.annotations.NotNull; - -import java.util.Collection; -import java.util.Collections; - -/** - * @author Daniel Espendiller - */ -public class AssetMapperModuleReferenceContributor extends JSResolvableModuleReferenceContributor { - @Override - protected ResolveResult @NotNull [] resolveElement(@NotNull PsiElement psiElement, @NotNull String module) { - if (!Symfony2ProjectComponent.isEnabled(psiElement)) { - return new ResolveResult[0]; - } - - Collection files = AssetMapperUtil.getModuleReferences(psiElement.getProject(), module); - - if (files.isEmpty()) { - return new ResolveResult[0]; - } - - return JSResolveResult.toResolveResults(PsiElementUtils.convertVirtualFilesToPsiFiles(psiElement.getProject(), files)); - } - - @Override - public @NotNull Collection getLookupElements(@NotNull String unquotedEscapedText, @NotNull PsiElement host) { - if (!Symfony2ProjectComponent.isEnabled(host)) { - return Collections.emptyList(); - } - - return AssetMapperUtil.getLookupElements(host.getProject()); - } - - @Override - public int getDefaultWeight() { - return 10; - } -} diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index 3ea8302a7..10ea33ad1 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -715,10 +715,6 @@ - - - - com.jetbrains.twig com.jetbrains.php JavaScript