How to distinct descriptor is in debug console or run console
to assume i have 2 descriptor, one i opened in debug console, and another is opened in run console, how to disctinct them? i try following code
RunContentManager cm = ExecutionManager.getInstance(curPj()).getContentManager();
Object ds = cm.getAllDescriptors();
but i can't find difference between the both
请先登录再写评论。
You can use RunContentManager.getToolWindowByDescriptor().getTitle() to distinguish whether a RunContentDescriptor belongs to a Run or Debug toolwindow. What are you trying to achieve, though? There may be a better possibility.
Dmitry Jemerov, getTitle can't solution all question, since if i run "Ex.java" and debug "Ex.java" too, their title is same, i found the way is following
Well, this may work for Java but will definitely not work for any non-JVM-based language. Let me ask again: What are you trying to achieve?
i wanna restart debug console with one key whereever my focus is located in.