private static void qualifyWithPrefix(@NotNull String namespacePrefix, @NotNull PsiElement context) {
    final PsiElement parent = context.getParent();

    if (parent instanceof XmlAttribute attribute) {
      final String prefix = attribute.getNamespacePrefix();

      if (!prefix.equals(namespacePrefix) && StringUtil.isNotEmpty(namespacePrefix)) {
        final String name = namespacePrefix + ":" + attribute.getLocalName();
        try {
          attribute.setName(name);
        }
        catch (IncorrectOperationException e) {
          LOG.error(e);
        }
      }
    }
  }
private static void qualifyWithPrefix(@NotNull String namespacePrefix, @NotNull PsiElement context)