public static @NotNull FileReferenceSet createSet(@NotNull PsiElement element,
                                                    final boolean soft,
                                                    boolean endingSlashNotAllowed,
                                                    final boolean urlEncoded) {

    final TextRange range = ElementManipulators.getValueTextRange(element);
    int offset = range.getStartOffset();
    String text = range.substring(element.getText());
    for (final FileReferenceHelper helper : FileReferenceHelperRegistrar.getHelpers()) {
      text = helper.trimUrl(text);
    }

    return new FileReferenceSet(text, element, offset, null, true, endingSlashNotAllowed) {
      @Override
      protected boolean isUrlEncoded() {
        return urlEncoded;
      }

      @Override
      protected boolean isSoft() {
        return soft;
      }
    };
  }
public static @NotNull FileReferenceSet createSet(@NotNull PsiElement element,
                                                    final boolean soft,
                                                    boolean endingSlashNotAllowed,
                                                    final boolean urlEncoded)