From ff7ca6e86d022bb3e44fe33445933eb26b6337c7 Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Wed, 16 Jun 2010 18:17:25 +0400 Subject: [PATCH] Revert invalid optimization in SurroundWithHandler --- .../generation/surroundWith/SurroundWithHandler.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/generation/surroundWith/SurroundWithHandler.java b/platform/lang-impl/src/com/intellij/codeInsight/generation/surroundWith/SurroundWithHandler.java index 9bb29ebcde0f..7efc9cee5cdb 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/generation/surroundWith/SurroundWithHandler.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/generation/surroundWith/SurroundWithHandler.java @@ -37,8 +37,8 @@ import com.intellij.psi.PsiFile; import com.intellij.util.IncorrectOperationException; import org.jetbrains.annotations.NotNull; -import java.util.HashSet; -import java.util.Set; +import java.util.ArrayList; +import java.util.List; public class SurroundWithHandler implements CodeInsightActionHandler{ private static final Logger LOG = Logger.getInstance("#com.intellij.codeInsight.generation.surroundWith.SurroundWithHandler"); @@ -77,7 +77,7 @@ public class SurroundWithHandler implements CodeInsightActionHandler{ final Language baseLanguage = file.getViewProvider().getBaseLanguage(); final Language l = element1.getParent().getLanguage(); - final Set surroundDescriptors = new HashSet(); + List surroundDescriptors = new ArrayList(); surroundDescriptors.addAll(LanguageSurrounders.INSTANCE.allForLanguage(l)); if (l != baseLanguage) surroundDescriptors.addAll(LanguageSurrounders.INSTANCE.allForLanguage(baseLanguage));