package com.jetbrains.ther.run.debug;

import com.intellij.openapi.project.Project;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.xdebugger.breakpoints.XBreakpointProperties;
import com.intellij.xdebugger.breakpoints.XLineBreakpoint;
import com.intellij.xdebugger.breakpoints.XLineBreakpointType;
import com.intellij.xdebugger.evaluation.XDebuggerEditorsProvider;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public class TheRLineBreakpointType extends XLineBreakpointType<XBreakpointProperties> {

  @NotNull
  private static final String ID = "the-r-line";

  @NotNull
  private static final String TITLE = "The R breakpoints";

  @NotNull
  private final TheRDebuggerEditorsProvider myProvider = new TheRDebuggerEditorsProvider();

  public TheRLineBreakpointType() {
    super(ID, TITLE);
  }

  @Nullable
  @Override
  public XBreakpointProperties createBreakpointProperties(@NotNull final VirtualFile file, final int line) {
    return null;
  }

  @Override
  public boolean canPutAt(@NotNull final VirtualFile file, final int line, @NotNull final Project project) {
    return TheRBreakpointUtils.canPutAt(project, file, line);
  }

  @Nullable
  @Override
  public XDebuggerEditorsProvider getEditorsProvider(@NotNull final XLineBreakpoint<XBreakpointProperties> breakpoint,
                                                     @NotNull final Project project) {
    return myProvider;
  }
}

@@ -169,217 +169,30 @@
 ts.X
-BreakpointProperties;%0Aimport com.intellij.xdebugger.breakpoints.XLineBreakpoint;%0Aimport com.intellij.xdebugger.breakpoints.XLineBreakpointType;%0Aimport com.intellij.xdebugger.evaluation.XDebuggerEditorsProvider
+LineBreakpointTypeBase
 ;%0Aim
@@ -234,51 +234,8 @@
 ull;
-%0Aimport org.jetbrains.annotations.Nullable;
 %0A%0Apu
@@ -295,39 +295,20 @@
 ointType
-%3CXBreakpointProperties%3E
+Base
  %7B%0A%0A  @N
@@ -420,17 +420,17 @@
  %22The R 
-b
+B
 reakpoin
@@ -441,321 +441,89 @@
 %0A%0A  
-@NotNull%0A  private final TheRDebuggerEditorsProvider myProvider = new TheRDebuggerEditorsProvider();%0A%0A  public TheRLineBreakpointType() %7B%0A    super(ID, TITLE);%0A  %7D%0A%0A  @Nullable%0A  @Override%0A  public XBreakpointProperties createBreakpointProperties(@NotNull final VirtualFile file, final int line) %7B%0A    return null
+public TheRLineBreakpointType() %7B%0A    super(ID, TITLE, new TheREditorsProvider())
 ;%0A  
@@ -661,16 +661,20 @@
 urn TheR
+Line
 Breakpoi
@@ -719,265 +719,7 @@
 %0A  %7D
-%0A%0A  @Nullable%0A  @Override%0A  public XDebuggerEditorsProvider getEditorsProvider(@NotNull final XLineBreakpoint%3CXBreakpointProperties%3E breakpoint,%0A                                                     @NotNull final Project project) %7B%0A    return myProvider;%0A  %7D
 %0A%7D%0A

simplify TheRLineBreakpointType by extending XLineBreakpointTypeBase