package com.cedricziel.idea.fluid.extensionPoints;

import com.cedricziel.idea.fluid.variables.FluidVariable;
import com.intellij.codeInsight.completion.CompletionParameters;
import com.intellij.openapi.extensions.ExtensionPointName;
import com.intellij.psi.PsiElement;
import com.intellij.util.ProcessingContext;
import org.jetbrains.annotations.NotNull;

import java.util.Collection;

public interface VariableProvider {
    public static ExtensionPointName<VariableProvider> EP_NAME = ExtensionPointName.create("com.cedricziel.idea.fluid.provider.variables");

    public @NotNull Collection<FluidVariable> provide(@NotNull CompletionParameters parameters, ProcessingContext context);

    public @NotNull Collection<FluidVariable> provide(@NotNull PsiElement element);
}

@@ -367,26 +367,19 @@
 va.util.
-Collection
+Map
 ;%0A%0Apubli
@@ -417,22 +417,8 @@
     
-public static 
 Exte
@@ -544,49 +544,12 @@
     
-public @NotNull Collection%3CFluidVariable%3E
+void
  pro
@@ -624,93 +624,136 @@
 text
-);%0A%0A    public @NotNull Collection%3CFluidVariable%3E provide(@NotNull PsiElement element
+, Map%3CString, FluidVariable%3E variableMap);%0A%0A    void provide(@NotNull PsiElement element, Map%3CString, FluidVariable%3E variableMap
 );%0A%7D

Rework VariableProvider to avoid creating too many lists