devenv.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:visualStudioAddon 作者: mohammad-suliman 项目源码 文件源码
def event_nameChange(self):
        #a nameChange event is fired by breakpoint UI control when the caret reaches a line with breakpoint, so, we rely on this to announce breakpoints
        global caretMovedToDifferentLine
        if not caretMovedToDifferentLine:
            #a nameChange event can be fired multiple times when moving by character within the same line, so, return if we already announced the break point for the current line 
            return
        caretMovedToDifferentLine = False
        currentLineNum = _getCurLineNumber()
        BPLineNum = self._getLineNumber()
        if currentLineNum == 0 or BPLineNum == 0 \
        or currentLineNum != BPLineNum:
            return
        if config.conf["visualStudio"]["beepOnBreakpoints"]:
            tones.beep(1000, 50)
        if not config.conf["visualStudio"]["announceBreakpoints"]:
            return
        message = _("breakpoint")
        state = re.search(REG_GET_BREAKPOINT_STATE, self.name)
        if  state:
            message += "  " 
            message += state.group()
        ui.message(message)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号