GutterDraggableObject () { return new GutterDraggableObject() { @Override public boolean copy(int line, VirtualFile file, int actionId) { if (canMoveTo(line, file)) { XDebuggerManagerImpl debuggerManager = (XDebuggerManagerImpl)XDebuggerManager.getInstance(getProject()); XBreakpointManagerImpl breakpointManager = debuggerManager.getBreakpointManager(); if (isCopyAction(actionId)) { breakpointManager.copyLineBreakpoint(XLineBreakpointImpl.this, file.getUrl(), line); } else { setFileUrl(file.getUrl()); setLine(line, true); XDebugSessionImpl session = debuggerManager.getCurrentSession(); if (session != null) { session.checkActiveNonLineBreakpointOnRemoval(XLineBreakpointImpl.this); } } return true; } return false; } @Override public void remove() { XDebuggerUtilImpl.removeBreakpointWithConfirmation(XLineBreakpointImpl.this); } @Override public Cursor getCursor(int line, VirtualFile file, int actionId) { if (canMoveTo(line, file)) { return isCopyAction(actionId) ? DragSource.DefaultCopyDrop : DragSource.DefaultMoveDrop; } return DragSource.DefaultMoveNoDrop; } private static boolean isCopyAction(int actionId) { return (actionId & DnDConstants.ACTION_COPY) == DnDConstants.ACTION_COPY; } }; }