Skip to content

Commit d85378e

Browse files
committed
remove paid / deprecated extensions from public repository
1 parent 9b05fc2 commit d85378e

File tree

4 files changed

+1
-51
lines changed

4 files changed

+1
-51
lines changed

src/main/java/fr/adrienbrault/idea/symfony2plugin/templating/util/PhpMethodVariableResolveUtil.java

+1-18
Original file line numberDiff line numberDiff line change
@@ -262,12 +262,10 @@ public static void visitRenderTemplateFunctions(@NotNull PsiElement context, @No
262262
private static class TemplateRenderPsiRecursiveElementWalkingVisitor extends PsiRecursiveElementWalkingVisitor {
263263
private final PsiElement context;
264264
private final Consumer<Triple<String, PhpNamedElement, FunctionReference>> consumer;
265-
private Set<String> methods;
266265

267266
TemplateRenderPsiRecursiveElementWalkingVisitor(PsiElement context, Consumer<Triple<String, PhpNamedElement, FunctionReference>> consumer) {
268267
this.context = context;
269268
this.consumer = consumer;
270-
methods = null;
271269
}
272270

273271
@Override
@@ -312,22 +310,7 @@ private void visitMethodReference(@NotNull MethodReference methodReference) {
312310
return;
313311
}
314312

315-
// init methods once per file
316-
if(methods == null) {
317-
methods = new HashSet<>();
318-
319-
PluginConfigurationExtension[] extensions = Symfony2ProjectComponent.PLUGIN_CONFIGURATION_EXTENSION.getExtensions();
320-
if(extensions.length > 0) {
321-
PluginConfigurationExtensionParameter pluginConfiguration = new PluginConfigurationExtensionParameter(context.getProject());
322-
for (PluginConfigurationExtension extension : extensions) {
323-
extension.invokePluginConfiguration(pluginConfiguration);
324-
}
325-
326-
methods.addAll(pluginConfiguration.getTemplateUsageMethod());
327-
}
328-
}
329-
330-
if(!methods.contains(methodName) && !methodName.toLowerCase().contains("render")) {
313+
if (!methodName.toLowerCase().contains("render")) {
331314
return;
332315
}
333316

src/main/java/fr/adrienbrault/idea/symfony2plugin/templating/util/TwigUtil.java

-22
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,6 @@ public enum NamespaceType {
9999
"fr.adrienbrault.idea.symfony2plugin.extension.TwigNamespaceExtension"
100100
);
101101

102-
public static final ExtensionPointName<TwigFileUsage> TWIG_FILE_USAGE_EXTENSIONS = new ExtensionPointName<>(
103-
"fr.adrienbrault.idea.symfony2plugin.extension.TwigFileUsage"
104-
);
105-
106102
private static final Key<CachedValue<Map<String, Set<VirtualFile>>>> TEMPLATE_CACHE_TWIG = new Key<>("TEMPLATE_CACHE_TWIG");
107103

108104
private static final Key<CachedValue<Map<String, Set<VirtualFile>>>> TEMPLATE_CACHE_ALL = new Key<>("TEMPLATE_CACHE_ALL");
@@ -2373,14 +2369,6 @@ public static void visitTemplateIncludes(@NotNull PsiElement psiElement, @NotNul
23732369
}
23742370
}
23752371
}
2376-
2377-
for (TwigFileUsage extension : TWIG_FILE_USAGE_EXTENSIONS.getExtensions()) {
2378-
if (extension.isIncludeTemplate(psiElement)) {
2379-
for (String template : extension.getIncludeTemplate(psiElement)) {
2380-
consumer.consume(new TemplateInclude(psiElement, template, TemplateInclude.TYPE.INCLUDE));
2381-
}
2382-
}
2383-
}
23842372
}
23852373
}
23862374

@@ -2833,16 +2821,6 @@ public void visitElement(PsiElement element) {
28332821
}
28342822
}
28352823

2836-
for (TwigFileUsage extension : TWIG_FILE_USAGE_EXTENSIONS.getExtensions()) {
2837-
if (!extension.isExtendsTemplate(element)) {
2838-
continue;
2839-
}
2840-
2841-
for (String template : extension.getExtendsTemplate(element)) {
2842-
consumer.consume(Pair.create(TwigUtil.normalizeTemplateName(template), element));
2843-
}
2844-
}
2845-
28462824
super.visitElement(element);
28472825
}
28482826
});

src/main/java/fr/adrienbrault/idea/symfony2plugin/twig/icon/TwigIconProvider.java

-6
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,6 @@ private boolean hasFileExtendsTag(@NotNull PsiElement element) {
5656
if (child instanceof TwigExtendsTag) {
5757
return true;
5858
}
59-
60-
for (TwigFileUsage extension : TwigUtil.TWIG_FILE_USAGE_EXTENSIONS.getExtensions()) {
61-
if (extension.isExtendsTemplate(child)) {
62-
return true;
63-
}
64-
}
6559
}
6660

6761
return false;

src/main/resources/META-INF/pay.xml

-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
<!-- All feature that are only available via valid plugin license (paid) -->
22
<idea-plugin url="https://www.jetbrains.com/idea">
33

4-
<extensionPoints>
5-
<extensionPoint dynamic="true" name="extension.PluginConfigurationExtension" interface="fr.adrienbrault.idea.symfony2plugin.extension.PluginConfigurationExtension"/>
6-
<extensionPoint dynamic="true" name="extension.TwigFileUsage" interface="fr.adrienbrault.idea.symfony2plugin.extension.TwigFileUsage"/>
7-
<extensionPoint dynamic="true" name="extension.TranslatorProvider" interface="fr.adrienbrault.idea.symfony2plugin.extension.TranslatorProvider"/>
84

9-
</extensionPoints>
105

116
</idea-plugin>

0 commit comments

Comments
 (0)