Skip to content

Commit

Permalink
remove paid / deprecated extensions from public repository
Browse files Browse the repository at this point in the history
  • Loading branch information
Haehnchen committed Jun 4, 2022
1 parent 9b05fc2 commit 9cc56cc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,12 +262,10 @@ public static void visitRenderTemplateFunctions(@NotNull PsiElement context, @No
private static class TemplateRenderPsiRecursiveElementWalkingVisitor extends PsiRecursiveElementWalkingVisitor {
private final PsiElement context;
private final Consumer<Triple<String, PhpNamedElement, FunctionReference>> consumer;
private Set<String> methods;

TemplateRenderPsiRecursiveElementWalkingVisitor(PsiElement context, Consumer<Triple<String, PhpNamedElement, FunctionReference>> consumer) {
this.context = context;
this.consumer = consumer;
methods = null;
}

@Override
Expand Down Expand Up @@ -312,22 +310,7 @@ private void visitMethodReference(@NotNull MethodReference methodReference) {
return;
}

// init methods once per file
if(methods == null) {
methods = new HashSet<>();

PluginConfigurationExtension[] extensions = Symfony2ProjectComponent.PLUGIN_CONFIGURATION_EXTENSION.getExtensions();
if(extensions.length > 0) {
PluginConfigurationExtensionParameter pluginConfiguration = new PluginConfigurationExtensionParameter(context.getProject());
for (PluginConfigurationExtension extension : extensions) {
extension.invokePluginConfiguration(pluginConfiguration);
}

methods.addAll(pluginConfiguration.getTemplateUsageMethod());
}
}

if(!methods.contains(methodName) && !methodName.toLowerCase().contains("render")) {
if (!methodName.toLowerCase().contains("render")) {
return;
}

Expand Down
5 changes: 0 additions & 5 deletions src/main/resources/META-INF/pay.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
<!-- All feature that are only available via valid plugin license (paid) -->
<idea-plugin url="https://www.jetbrains.com/idea">

<extensionPoints>
<extensionPoint dynamic="true" name="extension.PluginConfigurationExtension" interface="fr.adrienbrault.idea.symfony2plugin.extension.PluginConfigurationExtension"/>
<extensionPoint dynamic="true" name="extension.TwigFileUsage" interface="fr.adrienbrault.idea.symfony2plugin.extension.TwigFileUsage"/>
<extensionPoint dynamic="true" name="extension.TranslatorProvider" interface="fr.adrienbrault.idea.symfony2plugin.extension.TranslatorProvider"/>

</extensionPoints>

</idea-plugin>

0 comments on commit 9cc56cc

Please sign in to comment.