setbreakpointcommand.java

来自「Python Development Environment (Python I」· Java 代码 · 共 46 行

JAVA
46
字号
/*
 * Author: atotic
 * Created on May 6, 2004
 * License: Common Public License v1.0
 */
package org.python.pydev.debug.model.remote;

import org.python.pydev.core.FullRepIterable;

/**
 * Set breakpoint command.
 */
public class SetBreakpointCommand extends AbstractDebuggerCommand {

	public String file;
	public Object line;
	public String condition;
    private String functionName;

	public SetBreakpointCommand(AbstractRemoteDebugger debugger, String file, Object line, String condition, String functionName) {
		super(debugger);
		this.file = file;
		this.line = line;
		if (condition == null){
			this.condition = "None";
        }else{
			this.condition = condition;
        }
        this.functionName = functionName;
	}

	public String getOutgoing() {
        StringBuffer cmd = new StringBuffer().
        append(file).append("\t").append(line);
        
        if(functionName != null && functionName.trim().length() > 0){
            cmd.append("\t**FUNC**").append(FullRepIterable.getLastPart(functionName));
        }
        
        cmd.append("\t").append(condition);
        
        return makeCommand(CMD_SET_BREAK, sequence, cmd.toString());
    }

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?