def _OpenFileInSplitIfNeeded(filepath):
 buffer_num = GetBufferNumberForFilename(filepath, False)
 if BufferIsVisible(buffer_num):
  return (buffer_num, False)
 OpenFilename(filepath, {u'focus': True, u'fix': True, u'size': GetIntValue(u'&previewheight')})
 buffer_num = GetBufferNumberForFilename(filepath, False)
 if (not BufferIsVisible(buffer_num)):
  raise RuntimeError(u'Unable to open file: {0}\nFixIt/Refactor operation aborted prior to completion. Your files have not been fully updated. Please use undo commands to revert the applied changes.'.format(filepath))
 return (buffer_num, True)

def _OpenFileInSplitIfNeeded ( filepath ) : buffer_num = GetBufferNumberForFilename ( filepath , False ) if BufferIsVisible ( buffer_num ) : return ( buffer_num , False ) OpenFilename ( filepath , { u'focus' : True , u'fix' : True , u'size' : GetIntValue ( u'&previewheight' ) } ) buffer_num = GetBufferNumberForFilename ( filepath , False ) if ( not BufferIsVisible ( buffer_num ) ) : raise RuntimeError ( u'Unable to open file: {0}\nFixIt/Refactor operation aborted prior to completion. Your files have not been fully updated. Please use undo commands to revert the applied changes.' . format ( filepath ) ) return ( buffer_num , True )
ensure that the supplied filepath is open in a visible window .