use of com.intellij.debugger.impl.DebuggerContextImpl in project intellij-community by JetBrains.
the class JvmSmartStepIntoActionHandler method perform.
public void perform(@NotNull final Project project, final AnActionEvent event) {
final DebuggerContextImpl debuggerContext = (DebuggerManagerEx.getInstanceEx(project)).getContext();
final DebuggerSession session = debuggerContext.getDebuggerSession();
if (session != null) {
doStep(project, debuggerContext.getSourcePosition(), session);
}
}
use of com.intellij.debugger.impl.DebuggerContextImpl in project intellij-community by JetBrains.
the class JavaWithRuntimeCastSurrounder method surroundExpression.
public TextRange surroundExpression(Project project, Editor editor, PsiExpression expr) throws IncorrectOperationException {
DebuggerContextImpl debuggerContext = (DebuggerManagerEx.getInstanceEx(project)).getContext();
DebuggerSession debuggerSession = debuggerContext.getDebuggerSession();
if (debuggerSession != null) {
final ProgressWindowWithNotification progressWindow = new ProgressWindowWithNotification(true, expr.getProject());
SurroundWithCastWorker worker = new SurroundWithCastWorker(editor, expr, debuggerContext, progressWindow);
progressWindow.setTitle(DebuggerBundle.message("title.evaluating"));
debuggerContext.getDebugProcess().getManagerThread().startProgress(worker, progressWindow);
}
return null;
}
use of com.intellij.debugger.impl.DebuggerContextImpl in project intellij-community by JetBrains.
the class AddSteppingFilterAction method actionPerformed.
public void actionPerformed(final AnActionEvent e) {
final DebuggerContextImpl debuggerContext = DebuggerAction.getDebuggerContext(e.getDataContext());
DebugProcessImpl process = debuggerContext.getDebugProcess();
if (process == null) {
return;
}
final StackFrameProxyImpl proxy = PopFrameAction.getStackFrameProxy(e);
process.getManagerThread().schedule(new DebuggerCommandImpl() {
protected void action() throws Exception {
final String name = getClassName(proxy != null ? proxy : debuggerContext.getFrameProxy());
if (name == null) {
return;
}
final Project project = e.getData(CommonDataKeys.PROJECT);
ApplicationManager.getApplication().invokeLater(() -> {
String filter = Messages.showInputDialog(project, "", "Add Stepping Filter", null, name, null);
if (filter != null) {
ClassFilter[] newFilters = ArrayUtil.append(DebuggerSettings.getInstance().getSteppingFilters(), new ClassFilter(filter));
DebuggerSettings.getInstance().setSteppingFilters(newFilters);
}
});
}
});
}
use of com.intellij.debugger.impl.DebuggerContextImpl in project intellij-community by JetBrains.
the class AutoRendererAction method actionPerformed.
public void actionPerformed(@NotNull final AnActionEvent e) {
final DebuggerContextImpl debuggerContext = DebuggerAction.getDebuggerContext(e.getDataContext());
final DebugProcessImpl debugProcess = debuggerContext.getDebugProcess();
if (debugProcess != null) {
final List<JavaValue> selectedValues = ViewAsGroup.getSelectedValues(e);
if (!selectedValues.isEmpty()) {
debugProcess.getManagerThread().schedule(new DebuggerContextCommandImpl(debuggerContext) {
public void threadAction() {
for (JavaValue selectedValue : selectedValues) {
selectedValue.getDescriptor().setRenderer(null);
}
DebuggerAction.refreshViews(e);
}
});
}
}
}
use of com.intellij.debugger.impl.DebuggerContextImpl in project intellij-community by JetBrains.
the class DebuggerTreeNodeImpl method calcValue.
public void calcValue() {
final DebuggerContextImpl context = getTree().getDebuggerContext();
update(context, () -> {
EvaluationContextImpl evaluationContext = context.createEvaluationContext();
getDescriptor().setContext(evaluationContext);
getDescriptor().updateRepresentation(evaluationContext, new DescriptorLabelListener() {
@Override
public void labelChanged() {
updateCaches();
DebuggerTreeNodeImpl.this.labelChanged();
}
});
childrenChanged(true);
}, false);
}
Aggregations