package com.intellij.application.options;

import com.intellij.psi.codeStyle.FileTypeIndentOptionsProvider;
import com.intellij.psi.codeStyle.CodeStyleSettings;
import com.intellij.psi.PsiFile;
import com.intellij.openapi.fileTypes.FileType;
import com.intellij.openapi.fileTypes.StdFileTypes;

/**
 * @author yole
 */
public class XmlIndentOptionsProvider implements FileTypeIndentOptionsProvider {
  public CodeStyleSettings.IndentOptions createIndentOptions() {
    final CodeStyleSettings.IndentOptions options = new CodeStyleSettings.IndentOptions();
    // HACK [yole]
    if (System.getProperty("idea.platform.prefix").equals("Ruby")) {
      options.INDENT_SIZE = 2;
    }
    return options;
  }

  public FileType getFileType() {
    return StdFileTypes.XML;
  }

  public IndentOptionsEditor createOptionsEditor() {
    return new SmartIndentOptionsEditor();
  }

  public String getPreviewText() {
    return CodeStyleAbstractPanel.readFromFile(getClass(), "preview.xml.template");
  }

  public void prepareForReformat(final PsiFile psiFile) {
  }
}

@@ -60,237 +60,237 @@
 lij.
-psi.codeStyle.FileTypeIndentOptionsProvider;%0Aimport com.intellij.psi.codeStyle.CodeStyleSettings;%0Aimport com.intellij.psi.PsiFile;%0Aimport com.intellij.openapi.fileTypes.FileType;%0Aimport com.intellij.openapi.fileTypes.StdFileTypes
+openapi.fileTypes.FileType;%0Aimport com.intellij.openapi.fileTypes.StdFileTypes;%0Aimport com.intellij.psi.PsiFile;%0Aimport com.intellij.psi.codeStyle.CodeStyleSettings;%0Aimport com.intellij.psi.codeStyle.FileTypeIndentOptionsProvider
 ;%0A%0A/
@@ -575,16 +575,30 @@
 %0A    if 
+(%22Ruby%22.equals
 (System.
@@ -636,22 +636,8 @@
 ix%22)
-.equals(%22Ruby%22
 )) %7B

fix tests: flip equals