@Nullable public ExcludesConfigurationState getActualState() { ensureOldSettingsLoaded(); if (myExcludedFiles.isEmpty() && myExcludedFrameworks.isEmpty()) { return null; } final ExcludesConfigurationState state = new ExcludesConfigurationState(); state.getFrameworkTypes().addAll(myExcludedFrameworks); Collections.sort(state.getFrameworkTypes(), String.CASE_INSENSITIVE_ORDER); for (String typeId : myExcludedFiles.keySet()) { final VirtualFilePointerContainer container = myExcludedFiles.get(typeId); for (String url : container.getUrls()) { state.getFiles().add(new ExcludedFileState(url, typeId)); } } Collections.sort( state.getFiles(), new Comparator<ExcludedFileState>() { @Override public int compare(ExcludedFileState o1, ExcludedFileState o2) { return StringUtil.comparePairs( o1.getFrameworkType(), o1.getUrl(), o2.getFrameworkType(), o2.getUrl(), true); } }); return state; }
@Override @NotNull public String[] getUrls(@NotNull OrderRootType rootType) { assert !isDisposed(); final VirtualFilePointerContainer result = myRoots.get(rootType); return result.getUrls(); }