From a4cdd680585d5e29d4ffbb10fc5c42014c1d8df8 Mon Sep 17 00:00:00 2001 From: nik Date: Mon, 21 Jul 2014 14:01:34 +0400 Subject: [PATCH] update grails project structure: remove proper instance of ContentEntry (IDEA-120622) using urls since ContentEntry uses default equals/hashcode implementation --- .../plugins/groovy/mvc/MvcModuleStructureUtil.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/groovy/src/org/jetbrains/plugins/groovy/mvc/MvcModuleStructureUtil.java b/plugins/groovy/src/org/jetbrains/plugins/groovy/mvc/MvcModuleStructureUtil.java index a99de0b8eb10..df0e67385c8c 100644 --- a/plugins/groovy/src/org/jetbrains/plugins/groovy/mvc/MvcModuleStructureUtil.java +++ b/plugins/groovy/src/org/jetbrains/plugins/groovy/mvc/MvcModuleStructureUtil.java @@ -356,11 +356,11 @@ public class MvcModuleStructureUtil { private static void removeInvalidSourceRoots(List> actions, MvcProjectStructure structure) { final Set toRemove = ContainerUtil.newTroveSet(); - final Set toRemoveContent = ContainerUtil.newTroveSet(); + final Set toRemoveContent = ContainerUtil.newTroveSet(); for (ContentEntry entry : ModuleRootManager.getInstance(structure.myModule).getContentEntries()) { final VirtualFile file = entry.getFile(); if (file == null || !structure.isValidContentRoot(file)) { - toRemoveContent.add(entry); + toRemoveContent.add(entry.getUrl()); } else { for (SourceFolder folder : entry.getSourceFolders()) { @@ -376,7 +376,7 @@ public class MvcModuleStructureUtil { @Override public void consume(ModifiableRootModel model) { for (ContentEntry entry : model.getContentEntries()) { - if (toRemoveContent.remove(entry)) { + if (toRemoveContent.remove(entry.getUrl())) { model.removeContentEntry(entry); } else {