<commit_before>/*
 * Copyright (c) 2000-2007 JetBrains s.r.o. All Rights Reserved.
 */
package com.intellij.spring;

import com.intellij.jam.model.common.BaseRootImpl;
import com.intellij.openapi.extensions.Extensions;
import com.intellij.openapi.util.Iconable;
import com.intellij.psi.xml.XmlFile;
import com.intellij.psi.xml.XmlTag;
import com.intellij.spring.constants.SpringConstants;
import com.intellij.spring.impl.model.CustomBeanWrapperImpl;
import com.intellij.spring.impl.model.aop.*;
import com.intellij.spring.impl.model.beans.*;
import com.intellij.spring.impl.model.context.*;
import com.intellij.spring.impl.model.jee.JndiLookupImpl;
import com.intellij.spring.impl.model.jee.LocalSlsbImpl;
import com.intellij.spring.impl.model.jee.RemoteSlsbImpl;
import com.intellij.spring.impl.model.lang.LangBeanImpl;
import com.intellij.spring.impl.model.tx.TxAdviceImpl;
import com.intellij.spring.impl.model.tx.TxAnnotationDrivenImpl;
import com.intellij.spring.impl.model.util.*;
import com.intellij.spring.model.xml.CustomBeanWrapper;
import com.intellij.spring.model.xml.aop.*;
import com.intellij.spring.model.xml.beans.*;
import com.intellij.spring.model.xml.context.*;
import com.intellij.spring.model.xml.jee.JndiLookup;
import com.intellij.spring.model.xml.jee.LocalSlsb;
import com.intellij.spring.model.xml.jee.RemoteSlsb;
import com.intellij.spring.model.xml.lang.LangBean;
import com.intellij.spring.model.xml.tx.Advice;
import com.intellij.spring.model.xml.tx.AnnotationDriven;
import com.intellij.spring.model.xml.util.*;
import com.intellij.util.NotNullFunction;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.xml.DomFileDescription;
import consulo.awt.TargetAWT;
import consulo.spring.SpringIcons;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import javax.swing.*;
import java.util.Arrays;
import java.util.List;

/**
 * @author peter
*/
public class SpringDomFileDescription extends DomFileDescription<Beans> {
  
  private static final List<String> SPRING_NAMESPACES = Arrays.asList(SpringConstants.BEANS_DTD_1, SpringConstants.BEANS_DTD_2, SpringConstants.BEANS_XSD);

  public SpringDomFileDescription() {
    super(Beans.class, "beans");
  }

  @Nullable
  @Override
  public Icon getFileIcon(@Iconable.IconFlags int flags) {
    return TargetAWT.to(SpringIcons.SpringConfig);
  }

  @Override
  public boolean isMyFile(@NotNull XmlFile file) {
    return true;
  }

  protected void initializeFileDescription() {
<commit_msg>now we use image directly<commit_after>/*
 * Copyright (c) 2000-2007 JetBrains s.r.o. All Rights Reserved.
 */
package com.intellij.spring;

import com.intellij.jam.model.common.BaseRootImpl;
import com.intellij.openapi.extensions.Extensions;
import com.intellij.openapi.util.Iconable;
import com.intellij.psi.xml.XmlFile;
import com.intellij.psi.xml.XmlTag;
import com.intellij.spring.constants.SpringConstants;
import com.intellij.spring.impl.model.CustomBeanWrapperImpl;
import com.intellij.spring.impl.model.aop.*;
import com.intellij.spring.impl.model.beans.*;
import com.intellij.spring.impl.model.context.*;
import com.intellij.spring.impl.model.jee.JndiLookupImpl;
import com.intellij.spring.impl.model.jee.LocalSlsbImpl;
import com.intellij.spring.impl.model.jee.RemoteSlsbImpl;
import com.intellij.spring.impl.model.lang.LangBeanImpl;
import com.intellij.spring.impl.model.tx.TxAdviceImpl;
import com.intellij.spring.impl.model.tx.TxAnnotationDrivenImpl;
import com.intellij.spring.impl.model.util.*;
import com.intellij.spring.model.xml.CustomBeanWrapper;
import com.intellij.spring.model.xml.aop.*;
import com.intellij.spring.model.xml.beans.*;
import com.intellij.spring.model.xml.context.*;
import com.intellij.spring.model.xml.jee.JndiLookup;
import com.intellij.spring.model.xml.jee.LocalSlsb;
import com.intellij.spring.model.xml.jee.RemoteSlsb;
import com.intellij.spring.model.xml.lang.LangBean;
import com.intellij.spring.model.xml.tx.Advice;
import com.intellij.spring.model.xml.tx.AnnotationDriven;
import com.intellij.spring.model.xml.util.*;
import com.intellij.util.NotNullFunction;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.xml.DomFileDescription;
import consulo.spring.SpringIcons;
import consulo.ui.image.Image;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.Arrays;
import java.util.List;

/**
 * @author peter
*/
public class SpringDomFileDescription extends DomFileDescription<Beans> {
  
  private static final List<String> SPRING_NAMESPACES = Arrays.asList(SpringConstants.BEANS_DTD_1, SpringConstants.BEANS_DTD_2, SpringConstants.BEANS_XSD);

  public SpringDomFileDescription() {
    super(Beans.class, "beans");
  }

  @Nullable
  @Override
  public Image getFileIcon(@Iconable.IconFlags int flags) {
    return SpringIcons.SpringConfig;
  }

  @Override
  public boolean isMyFile(@NotNull XmlFile file) {
    return true;
  }

  protected void initializeFileDescription() {

{'fraction_non_alphanumeric': 0.11942675159235669, 'fraction_numerical': 0.003980891719745223, 'mean_word_length': 5.467181467181467, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 28}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5277675', 'n_tokens_mistral': 1743, 'n_tokens_neox': 1704, 'n_words': 254}