void () { ApplicationManager.getApplication().runWriteAction(() -> { ExternalResourceManagerEx manager = ExternalResourceManagerEx.getInstanceEx(); if (myProject == null) { manager.clearAllResources(); } else { manager.clearAllResources(myProject); } for (NameLocationPair pair : myPairs) { String s = FileUtil.toSystemIndependentName(StringUtil.notNullize(pair.myLocation)); if (myProject == null || pair.myShared) { manager.addResource(pair.myName, s); } else { manager.addResource(pair.myName, s, myProject); } } manager.addIgnoredResources(myIgnoredUrls, null); }); setModified(false); }