calldepth.java
来自「Python Development Environment (Python I」· Java 代码 · 共 35 行
JAVA
35 行
package org.python.pydev.refactoring.ast.printer;
public class CallDepth {
private int nestedCallDepth;
private int savedNestedCallDepth;
public void enterCall() {
nestedCallDepth++;
}
public void leaveCall() {
nestedCallDepth--;
if (nestedCallDepth < 0)
nestedCallDepth = 0;
}
public boolean inCall() {
return nestedCallDepth > 0;
}
public void disableCallDepth() {
savedNestedCallDepth = nestedCallDepth;
nestedCallDepth = 0;
}
public void enableCallDepth() {
nestedCallDepth = savedNestedCallDepth;
}
public boolean isCallDepthEnabled() {
return (savedNestedCallDepth == nestedCallDepth);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?