update editor to add/remove inlined debug values when the option is set to on/off

This commit is contained in:
Konstantin Bulenkov
2015-02-17 00:48:46 +01:00
parent be5639b56e
commit b75d22162c
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,7 +15,11 @@
*/
package com.intellij.xdebugger.impl.actions;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.RegistryToggleAction;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.fileEditor.FileEditorManager;
import com.intellij.openapi.project.Project;
/**
* @author Konstantin Bulenkov
@@ -24,4 +28,15 @@ public class UseInlineDebuggerAction extends RegistryToggleAction {
public UseInlineDebuggerAction() {
super("ide.debugger.inline");
}
@Override
public void doWhenDone(AnActionEvent e) {
Project project = e.getProject();
if (project != null) {
final Editor editor = FileEditorManager.getInstance(project).getSelectedTextEditor();
if (editor != null) {
editor.getComponent().repaint();
}
}
}
}