IDEA-73140 XDebugger: Debugger always switches you to "Debugger" tab when first breakpoint is hit

This commit is contained in:
Egor.Ushakov
2014-07-02 18:40:58 +04:00
parent 496fb918b8
commit 42104b9222
6 changed files with 16 additions and 4 deletions
@@ -681,6 +681,7 @@
<action id="XDebugger.AutoTooltip" class="com.intellij.xdebugger.impl.actions.ValueTooltipAutoShowAction"/>
<action id="XDebugger.ToggleSortValues" class="com.intellij.xdebugger.impl.ui.tree.actions.SortValuesToggleAction" icon="AllIcons.ObjectBrowser.Sorted"/>
<action id="Debugger.MarkObject" class="com.intellij.xdebugger.impl.actions.MarkObjectAction"/>
<action id="Debugger.FocusOnBreakpoint" class="com.intellij.xdebugger.impl.actions.FocusOnBreakpointAction"/>
</group>
<group id="XDebugger.ToolWindow.TopToolbar">
@@ -694,6 +694,14 @@ public class XDebugSessionImpl implements XDebugSession {
myActiveNonLineBreakpoint = !(breakpoint instanceof XLineBreakpoint<?>) ? breakpoint : null;
positionReached(suspendContext);
UIUtil.invokeLaterIfNeeded(new Runnable() {
@Override
public void run() {
mySessionTab.toFront();
mySessionTab.getUi().attractBy(XDebuggerUIConstants.LAYOUT_VIEW_BREAKPOINT_CONDITION);
}
});
if (breakpoint instanceof XLineBreakpoint<?> && ((XLineBreakpoint)breakpoint).isTemporary()) {
handleTemporaryBreakpointHit(breakpoint);
}
@@ -775,8 +783,6 @@ public class XDebugSessionImpl implements XDebugSession {
initSessionTab();
showSessionTab();
}
mySessionTab.toFront();
mySessionTab.getUi().attractBy(XDebuggerUIConstants.LAYOUT_VIEW_BREAKPOINT_CONDITION);
if (myCurrentPosition != null) {
adjustMouseTrackingCounter(myCurrentPosition, 1);
}
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.debugger.ui.breakpoints.actions;
package com.intellij.xdebugger.impl.actions;
import com.intellij.execution.ui.actions.AbstractFocusOnAction;
import com.intellij.xdebugger.impl.ui.XDebuggerUIConstants;
@@ -68,4 +68,6 @@ public interface XDebuggerActions {
@NonNls String AUTO_TOOLTIP = "XDebugger.AutoTooltip";
@NonNls String MARK_OBJECT = "Debugger.MarkObject";
@NonNls String FOCUS_ON_BREAKPOINT = "Debugger.FocusOnBreakpoint";
}
@@ -237,6 +237,10 @@ public class XDebugSessionTab extends DebuggerSessionTabBase {
initLogConsoles(runConfiguration, myRunContentDescriptor.getProcessHandler(), myConsole);
}
final DefaultActionGroup focus = new DefaultActionGroup();
focus.add(ActionManager.getInstance().getAction(XDebuggerActions.FOCUS_ON_BREAKPOINT));
myUi.getOptions().setAdditionalFocusActions(focus);
rebuildViews();
}
-1
View File
@@ -184,7 +184,6 @@
<action id="Debugger.ResumeThread" class="com.intellij.debugger.actions.ResumeThreadAction"/>
<action id="Debugger.FreezeThread" class="com.intellij.debugger.actions.FreezeThreadAction"/>
<action id="Debugger.InterruptThread" class="com.intellij.debugger.actions.InterruptThreadAction"/>
<action id="Debugger.FocusOnBreakpoint" class="com.intellij.debugger.ui.breakpoints.actions.FocusOnBreakpointAction"/>
<add-to-group group-id="DebuggerActions" anchor="first"/>
</group>