mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
update grails project structure: remove proper instance of ContentEntry (IDEA-120622) using urls since ContentEntry uses default equals/hashcode implementation
This commit is contained in:
@@ -356,11 +356,11 @@ public class MvcModuleStructureUtil {
|
||||
|
||||
private static void removeInvalidSourceRoots(List<Consumer<ModifiableRootModel>> actions, MvcProjectStructure structure) {
|
||||
final Set<SourceFolder> toRemove = ContainerUtil.newTroveSet();
|
||||
final Set<ContentEntry> toRemoveContent = ContainerUtil.newTroveSet();
|
||||
final Set<String> 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 {
|
||||
|
||||
Reference in New Issue
Block a user