// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.openapi.editor.richcopy.view;

import com.intellij.openapi.editor.richcopy.model.SyntaxInfo;
import org.jetbrains.annotations.NotNull;

import java.awt.datatransfer.DataFlavor;

public class HtmlTransferableData extends HtmlSyntaxInfoReader implements RawTextWithMarkup {
  @NotNull public static final DataFlavor FLAVOR = new DataFlavor("text/html; class=java.io.Reader; charset=UTF-8", "HTML text");
  public static final int PRIORITY = 200;

  @NotNull
  private final DataFlavor myDataFlavor;

  public HtmlTransferableData(@NotNull SyntaxInfo syntaxInfo, int tabSize) {
    super(syntaxInfo, tabSize);
    myDataFlavor = FLAVOR;
  }

  @Override
  public DataFlavor getFlavor() {
    return myDataFlavor;
  }

  @Override
  public int getOffsetCount() {
    return 0;
  }

  @Override
  public int getOffsets(int[] offsets, int index) {
    return index;
  }

  @Override
  public int setOffsets(int[] offsets, int index) {
    return index;
  }

  @Override
  public int getPriority() {
    return PRIORITY;
  }
}

@@ -604,61 +604,8 @@
 0;%0A%0A
-  @NotNull%0A  private final DataFlavor myDataFlavor;%0A%0A
   pu
@@ -673,24 +673,24 @@
  tabSize) %7B%0A
+
     super(sy
@@ -713,35 +713,8 @@
 e);%0A
-    myDataFlavor = FLAVOR;%0A
   %7D%0A
@@ -775,20 +775,14 @@
 urn 
-myDataFlavor
+FLAVOR
 ;%0A  

remove unused field