From b184a7e42f8c8951e7562e57f2312676aa04a2cf Mon Sep 17 00:00:00 2001 From: Daniel Espendiller Date: Mon, 23 Jan 2023 17:20:04 +0100 Subject: [PATCH] fix more preview intention features breaks --- .../symfony2plugin/intentions/php/PhpServiceIntention.java | 7 +++++++ .../PhpServiceIntention/description.html | 5 +++++ 2 files changed, 12 insertions(+) create mode 100644 src/main/resources/intentionDescriptions/PhpServiceIntention/description.html diff --git a/src/main/java/fr/adrienbrault/idea/symfony2plugin/intentions/php/PhpServiceIntention.java b/src/main/java/fr/adrienbrault/idea/symfony2plugin/intentions/php/PhpServiceIntention.java index 5fd48d918..a6c212e31 100644 --- a/src/main/java/fr/adrienbrault/idea/symfony2plugin/intentions/php/PhpServiceIntention.java +++ b/src/main/java/fr/adrienbrault/idea/symfony2plugin/intentions/php/PhpServiceIntention.java @@ -1,9 +1,11 @@ package fr.adrienbrault.idea.symfony2plugin.intentions.php; +import com.intellij.codeInsight.intention.FileModifier; import com.intellij.codeInsight.intention.PsiElementBaseIntentionAction; import com.intellij.openapi.editor.Editor; import com.intellij.openapi.project.Project; import com.intellij.psi.PsiElement; +import com.intellij.psi.PsiFile; import com.intellij.util.IncorrectOperationException; import com.jetbrains.php.lang.psi.PhpPsiUtil; import com.jetbrains.php.lang.psi.elements.Method; @@ -11,11 +13,16 @@ import fr.adrienbrault.idea.symfony2plugin.Symfony2ProjectComponent; import fr.adrienbrault.idea.symfony2plugin.action.generator.ServiceGenerateAction; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; /** * @author Daniel Espendiller */ public class PhpServiceIntention extends PsiElementBaseIntentionAction { + @Override + public @Nullable FileModifier getFileModifierForPreview(@NotNull PsiFile target) { + return null; + } @Override public void invoke(@NotNull Project project, Editor editor, @NotNull PsiElement psiElement) throws IncorrectOperationException { diff --git a/src/main/resources/intentionDescriptions/PhpServiceIntention/description.html b/src/main/resources/intentionDescriptions/PhpServiceIntention/description.html new file mode 100644 index 000000000..c09576e0f --- /dev/null +++ b/src/main/resources/intentionDescriptions/PhpServiceIntention/description.html @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file