diff --git a/java/debugger/impl/src/com/intellij/debugger/actions/ViewTextAction.java b/java/debugger/impl/src/com/intellij/debugger/actions/ViewTextAction.java index f95eeb11f44b..f5e87c66dab2 100644 --- a/java/debugger/impl/src/com/intellij/debugger/actions/ViewTextAction.java +++ b/java/debugger/impl/src/com/intellij/debugger/actions/ViewTextAction.java @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.debugger.actions; import com.intellij.debugger.engine.DebuggerUtils; @@ -28,6 +14,7 @@ import com.intellij.openapi.util.text.StringUtil; import com.intellij.util.ui.JBUI; import com.intellij.util.ui.components.BorderLayoutPanel; import com.intellij.xdebugger.frame.XValue; +import com.intellij.xdebugger.impl.breakpoints.XExpressionImpl; import com.intellij.xdebugger.impl.ui.DebuggerUIUtil; import com.intellij.xdebugger.impl.ui.TextViewer; import com.intellij.xdebugger.impl.ui.tree.XDebuggerTree; @@ -131,7 +118,8 @@ public class ViewTextAction extends XFetchValueActionBase { protected void doOKAction() { if (myStringNode != null) { DebuggerUIUtil.setTreeNodeValue(myStringNode, - StringUtil.wrapWithDoubleQuote(DebuggerUtils.translateStringValue(myTextViewer.getText())), + XExpressionImpl.fromText( + StringUtil.wrapWithDoubleQuote(DebuggerUtils.translateStringValue(myTextViewer.getText()))), errorMessage -> Messages.showErrorDialog(myStringNode.getTree(), errorMessage)); } super.doOKAction(); diff --git a/java/debugger/impl/src/com/intellij/debugger/engine/JavaValueModifier.java b/java/debugger/impl/src/com/intellij/debugger/engine/JavaValueModifier.java index b0b149916c77..9bc74c279336 100644 --- a/java/debugger/impl/src/com/intellij/debugger/engine/JavaValueModifier.java +++ b/java/debugger/impl/src/com/intellij/debugger/engine/JavaValueModifier.java @@ -1,4 +1,4 @@ -// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.debugger.engine; import com.intellij.debugger.DebuggerBundle; @@ -17,6 +17,7 @@ import com.intellij.openapi.progress.util.ProgressWindow; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.text.StringUtil; import com.intellij.psi.PsiElement; +import com.intellij.xdebugger.XExpression; import com.intellij.xdebugger.frame.XValueModifier; import com.sun.jdi.*; import org.jetbrains.annotations.NotNull; @@ -88,10 +89,10 @@ public abstract class JavaValueModifier extends XValueModifier { //node.setState(context); } - protected abstract void setValueImpl(@NotNull String expression, @NotNull XModificationCallback callback); + protected abstract void setValueImpl(@NotNull XExpression expression, @NotNull XModificationCallback callback); @Override - public void setValue(@NotNull String expression, @NotNull XModificationCallback callback) { + public void setValue(@NotNull XExpression expression, @NotNull XModificationCallback callback) { final NodeDescriptorImpl descriptor = myJavaValue.getDescriptor(); if(!((ValueDescriptorImpl)descriptor).canSetValue()) { return; @@ -145,7 +146,7 @@ public abstract class JavaValueModifier extends XValueModifier { InvalidTypeException; } - private static void setValue(String expressionToShow, ExpressionEvaluator evaluator, EvaluationContextImpl evaluationContext, SetValueRunnable setValueRunnable) throws EvaluateException { + private static void setValue(ExpressionEvaluator evaluator, EvaluationContextImpl evaluationContext, SetValueRunnable setValueRunnable) throws EvaluateException { Value value; try { value = evaluator.evaluate(evaluationContext); @@ -170,7 +171,7 @@ public abstract class JavaValueModifier extends XValueModifier { refType = setValueRunnable.loadClass(evaluationContext, ex.className()); if (refType != null) { //try again - setValue(expressionToShow, evaluator, evaluationContext, setValueRunnable); + setValue(evaluator, evaluationContext, setValueRunnable); } } catch (InvocationException | InvalidTypeException | IncompatibleThreadStateException | ClassNotLoadedException e) { @@ -182,7 +183,7 @@ public abstract class JavaValueModifier extends XValueModifier { } } - protected void set(@NotNull final String expression, final XModificationCallback callback, final DebuggerContextImpl debuggerContext, final SetValueRunnable setValueRunnable) { + protected void set(@NotNull final XExpression expression, final XModificationCallback callback, final DebuggerContextImpl debuggerContext, final SetValueRunnable setValueRunnable) { final ProgressWindow progressWindow = new ProgressWindow(true, debuggerContext.getProject()); final EvaluationContextImpl evaluationContext = myJavaValue.getEvaluationContext(); @@ -200,12 +201,12 @@ public abstract class JavaValueModifier extends XValueModifier { evaluator = DebuggerInvocationUtil.commitAndRunReadAction(project, new EvaluatingComputable() { public ExpressionEvaluator compute() throws EvaluateException { return EvaluatorBuilderImpl - .build(new TextWithImportsImpl(CodeFragmentKind.EXPRESSION, expression), context, position, project); + .build(TextWithImportsImpl.fromXExpression(expression), context, position, project); } }); - setValue(expression, evaluator, evaluationContext, new SetValueRunnable() { + setValue(evaluator, evaluationContext, new SetValueRunnable() { public void setValue(EvaluationContextImpl evaluationContext, Value newValue) throws ClassNotLoadedException, InvalidTypeException, EvaluateException, diff --git a/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/ArgumentValueDescriptorImpl.java b/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/ArgumentValueDescriptorImpl.java index 581176c4bb66..00e0290cb698 100644 --- a/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/ArgumentValueDescriptorImpl.java +++ b/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/ArgumentValueDescriptorImpl.java @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2016 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.debugger.ui.impl.watch; import com.intellij.debugger.DebuggerBundle; @@ -31,6 +17,7 @@ import com.intellij.psi.JavaPsiFacade; import com.intellij.psi.PsiElementFactory; import com.intellij.psi.PsiExpression; import com.intellij.util.IncorrectOperationException; +import com.intellij.xdebugger.XExpression; import com.intellij.xdebugger.frame.XValueModifier; import com.sun.jdi.*; import org.jetbrains.annotations.NotNull; @@ -83,7 +70,7 @@ public class ArgumentValueDescriptorImpl extends ValueDescriptorImpl{ public XValueModifier getModifier(JavaValue value) { return new JavaValueModifier(value) { @Override - protected void setValueImpl(@NotNull String expression, @NotNull XModificationCallback callback) { + protected void setValueImpl(@NotNull XExpression expression, @NotNull XModificationCallback callback) { final DecompiledLocalVariable local = ArgumentValueDescriptorImpl.this.getVariable(); if (local != null) { final DebuggerContextImpl debuggerContext = DebuggerManagerEx.getInstanceEx(getProject()).getContext(); diff --git a/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/ArrayElementDescriptorImpl.java b/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/ArrayElementDescriptorImpl.java index 2e760f420a30..91b8f145d3c8 100644 --- a/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/ArrayElementDescriptorImpl.java +++ b/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/ArrayElementDescriptorImpl.java @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2016 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.debugger.ui.impl.watch; import com.intellij.debugger.DebuggerBundle; @@ -32,6 +18,7 @@ import com.intellij.psi.JavaPsiFacade; import com.intellij.psi.PsiElementFactory; import com.intellij.psi.PsiExpression; import com.intellij.util.IncorrectOperationException; +import com.intellij.xdebugger.XExpression; import com.intellij.xdebugger.frame.XValueModifier; import com.sun.jdi.*; import org.jetbrains.annotations.NotNull; @@ -86,7 +73,7 @@ public class ArrayElementDescriptorImpl extends ValueDescriptorImpl implements A public XValueModifier getModifier(JavaValue value) { return new JavaValueModifier(value) { @Override - protected void setValueImpl(@NotNull String expression, @NotNull XModificationCallback callback) { + protected void setValueImpl(@NotNull XExpression expression, @NotNull XModificationCallback callback) { final ArrayElementDescriptorImpl elementDescriptor = ArrayElementDescriptorImpl.this; final ArrayReference array = elementDescriptor.getArray(); if (array != null) { diff --git a/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/EvaluationDescriptor.java b/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/EvaluationDescriptor.java index 9ada361e9aca..e09b452c8b96 100644 --- a/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/EvaluationDescriptor.java +++ b/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/EvaluationDescriptor.java @@ -1,4 +1,4 @@ -// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.debugger.ui.impl.watch; import com.intellij.debugger.DebuggerBundle; @@ -23,6 +23,7 @@ import com.intellij.openapi.application.ReadAction; import com.intellij.openapi.project.IndexNotReadyException; import com.intellij.openapi.project.Project; import com.intellij.psi.*; +import com.intellij.xdebugger.XExpression; import com.intellij.xdebugger.frame.XValueModifier; import com.sun.jdi.*; import org.jetbrains.annotations.NotNull; @@ -136,7 +137,7 @@ public abstract class EvaluationDescriptor extends ValueDescriptorImpl { public XValueModifier getModifier(JavaValue value) { return new JavaValueModifier(value) { @Override - protected void setValueImpl(@NotNull String expression, @NotNull XModificationCallback callback) { + protected void setValueImpl(@NotNull XExpression expression, @NotNull XModificationCallback callback) { final EvaluationDescriptor evaluationDescriptor = EvaluationDescriptor.this; if (evaluationDescriptor.canSetValue()) { final DebuggerContextImpl debuggerContext = DebuggerManagerEx.getInstanceEx(getProject()).getContext(); diff --git a/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/FieldDescriptorImpl.java b/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/FieldDescriptorImpl.java index 9dbfcfa11b4b..5ec4faefc8ef 100644 --- a/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/FieldDescriptorImpl.java +++ b/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/FieldDescriptorImpl.java @@ -1,4 +1,4 @@ -// Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.debugger.ui.impl.watch; import com.intellij.debugger.DebuggerBundle; @@ -24,6 +24,7 @@ import com.intellij.psi.JavaPsiFacade; import com.intellij.psi.PsiElementFactory; import com.intellij.psi.PsiExpression; import com.intellij.util.IncorrectOperationException; +import com.intellij.xdebugger.XExpression; import com.intellij.xdebugger.frame.XValueModifier; import com.sun.jdi.*; import org.jetbrains.annotations.NotNull; @@ -175,7 +176,7 @@ public class FieldDescriptorImpl extends ValueDescriptorImpl implements FieldDes public XValueModifier getModifier(JavaValue value) { return new JavaValueModifier(value) { @Override - protected void setValueImpl(@NotNull String expression, @NotNull XModificationCallback callback) { + protected void setValueImpl(@NotNull XExpression expression, @NotNull XModificationCallback callback) { final DebuggerContextImpl debuggerContext = DebuggerManagerEx.getInstanceEx(getProject()).getContext(); FieldDescriptorImpl fieldDescriptor = FieldDescriptorImpl.this; final Field field = fieldDescriptor.getField(); diff --git a/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/LocalVariableDescriptorImpl.java b/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/LocalVariableDescriptorImpl.java index 718b855a56f5..eb6e8a852c53 100644 --- a/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/LocalVariableDescriptorImpl.java +++ b/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/LocalVariableDescriptorImpl.java @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2016 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.debugger.ui.impl.watch; import com.intellij.debugger.DebuggerBundle; @@ -34,6 +20,7 @@ import com.intellij.psi.JavaPsiFacade; import com.intellij.psi.PsiElementFactory; import com.intellij.psi.PsiExpression; import com.intellij.util.IncorrectOperationException; +import com.intellij.xdebugger.XExpression; import com.intellij.xdebugger.frame.XValueModifier; import com.sun.jdi.*; import org.jetbrains.annotations.NotNull; @@ -121,7 +108,7 @@ public class LocalVariableDescriptorImpl extends ValueDescriptorImpl implements public XValueModifier getModifier(JavaValue value) { return new JavaValueModifier(value) { @Override - protected void setValueImpl(@NotNull String expression, @NotNull XModificationCallback callback) { + protected void setValueImpl(@NotNull XExpression expression, @NotNull XModificationCallback callback) { final LocalVariableProxyImpl local = LocalVariableDescriptorImpl.this.getLocalVariable(); if (local != null) { final DebuggerContextImpl debuggerContext = DebuggerManagerEx.getInstanceEx(getProject()).getContext(); diff --git a/platform/script-debugger/debugger-ui/src/VariableView.kt b/platform/script-debugger/debugger-ui/src/VariableView.kt index 6503cc933f71..e00abe80bcd9 100644 --- a/platform/script-debugger/debugger-ui/src/VariableView.kt +++ b/platform/script-debugger/debugger-ui/src/VariableView.kt @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package org.jetbrains.debugger import com.intellij.icons.AllIcons @@ -24,6 +10,7 @@ import com.intellij.psi.PsiElement import com.intellij.psi.PsiReference import com.intellij.util.SmartList import com.intellij.util.ThreeState +import com.intellij.xdebugger.XExpression import com.intellij.xdebugger.XSourcePositionWrapper import com.intellij.xdebugger.frame.* import com.intellij.xdebugger.frame.presentation.XKeywordValuePresentation @@ -313,8 +300,8 @@ class VariableView(override val variableName: String, private val variable: Vari } } - override fun setValue(expression: String, callback: XValueModifier.XModificationCallback) { - variable.valueModifier!!.setValue(variable, expression, evaluateContext) + override fun setValue(expression: XExpression, callback: XValueModifier.XModificationCallback) { + variable.valueModifier!!.setValue(variable, expression.expression, evaluateContext) .doneRun { value = null callback.valueModified() diff --git a/platform/xdebugger-api/src/com/intellij/xdebugger/frame/XValueModifier.java b/platform/xdebugger-api/src/com/intellij/xdebugger/frame/XValueModifier.java index f86e135c40e3..ce675109b785 100644 --- a/platform/xdebugger-api/src/com/intellij/xdebugger/frame/XValueModifier.java +++ b/platform/xdebugger-api/src/com/intellij/xdebugger/frame/XValueModifier.java @@ -1,20 +1,7 @@ -/* - * Copyright 2000-2014 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.xdebugger.frame; +import com.intellij.xdebugger.XExpression; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -23,12 +10,22 @@ import org.jetbrains.annotations.Nullable; */ public abstract class XValueModifier { + /** + * @deprecated Use {@link #setValue(XExpression, XModificationCallback)} instead + */ + @Deprecated + public void setValue(@NotNull String expression, @NotNull XModificationCallback callback) { + throw new AbstractMethodError(); + } + /** * Start modification of the value. Note that this method is called from the Event Dispatch Thread so it should return quickly * @param expression new value * @param callback used to notify that value has been successfully modified or an error occurs */ - public abstract void setValue(@NotNull String expression, @NotNull XModificationCallback callback); + public void setValue(@NotNull XExpression expression, @NotNull XModificationCallback callback) { + setValue(expression.getExpression(), callback); + } /** * @return return text to show in expression editor when "Set Value" action is invoked diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/ui/DebuggerUIUtil.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/ui/DebuggerUIUtil.java index 5739d91d9d3a..4217e9d8ce8b 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/ui/DebuggerUIUtil.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/ui/DebuggerUIUtil.java @@ -1,6 +1,4 @@ -/* - * Copyright 2000-2017 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. - */ +// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.xdebugger.impl.ui; import com.intellij.codeInsight.hint.HintUtil; @@ -426,7 +424,7 @@ public class DebuggerUIUtil { return object instanceof Obsolescent && ((Obsolescent)object).isObsolete(); } - public static void setTreeNodeValue(XValueNodeImpl valueNode, String text, Consumer errorConsumer) { + public static void setTreeNodeValue(XValueNodeImpl valueNode, XExpression text, Consumer errorConsumer) { XDebuggerTree tree = valueNode.getTree(); Project project = tree.getProject(); XValueModifier modifier = valueNode.getValueContainer().getModifier(); diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/ui/tree/SetValueInplaceEditor.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/ui/tree/SetValueInplaceEditor.java index 45684d75cf48..cb4e1da5f0d3 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/ui/tree/SetValueInplaceEditor.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/ui/tree/SetValueInplaceEditor.java @@ -1,18 +1,4 @@ -/* - * Copyright 2000-2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.xdebugger.impl.ui.tree; import com.intellij.codeInsight.hint.HintManager; @@ -106,7 +92,7 @@ public class SetValueInplaceEditor extends XDebuggerTreeInplaceEditor { public void doOKAction() { if (myModifier == null) return; - DebuggerUIUtil.setTreeNodeValue(myValueNode, getExpression().getExpression(), errorMessage -> { + DebuggerUIUtil.setTreeNodeValue(myValueNode, getExpression(), errorMessage -> { Editor editor = getEditor(); if (editor != null) { HintManager.getInstance().showErrorHint(editor, errorMessage); diff --git a/python/pydevSrc/com/jetbrains/python/debugger/PyValueModifier.java b/python/pydevSrc/com/jetbrains/python/debugger/PyValueModifier.java index 8be3557f7aab..bb629699ec99 100644 --- a/python/pydevSrc/com/jetbrains/python/debugger/PyValueModifier.java +++ b/python/pydevSrc/com/jetbrains/python/debugger/PyValueModifier.java @@ -1,6 +1,7 @@ package com.jetbrains.python.debugger; import com.intellij.openapi.application.ApplicationManager; +import com.intellij.xdebugger.XExpression; import com.intellij.xdebugger.frame.XValueModifier; import org.jetbrains.annotations.NotNull; @@ -16,10 +17,10 @@ public class PyValueModifier extends XValueModifier { } @Override - public void setValue(@NotNull final String expression, @NotNull final XModificationCallback callback) { + public void setValue(@NotNull final XExpression expression, @NotNull final XModificationCallback callback) { ApplicationManager.getApplication().executeOnPooledThread(() -> { try { - myDebugProcess.changeVariable(myVariable, expression); + myDebugProcess.changeVariable(myVariable, expression.getExpression()); callback.valueModified(); } catch (PyDebuggerException e) {