use of com.intellij.xdebugger.impl.breakpoints.XExpressionState in project intellij-community by JetBrains.
the class DebuggerUtilsImpl method writeTextWithImports.
@Override
public void writeTextWithImports(Element root, String name, TextWithImports value) {
if (value.getKind() == CodeFragmentKind.EXPRESSION) {
JDOMExternalizerUtil.writeField(root, name, value.toExternalForm());
} else {
Element element = JDOMExternalizerUtil.writeOption(root, name);
XExpression expression = TextWithImportsImpl.toXExpression(value);
if (expression != null) {
XmlSerializer.serializeInto(new XExpressionState(expression), element, new SkipDefaultValuesSerializationFilters());
}
}
}
use of com.intellij.xdebugger.impl.breakpoints.XExpressionState in project intellij-community by JetBrains.
the class DebuggerUtilsImpl method readTextWithImports.
@Override
public TextWithImports readTextWithImports(Element root, String name) {
String s = JDOMExternalizerUtil.readField(root, name);
if (s != null) {
return new TextWithImportsImpl(CodeFragmentKind.EXPRESSION, s);
} else {
Element option = JDOMExternalizerUtil.getOption(root, name);
if (option != null) {
XExpressionState state = new XExpressionState();
XmlSerializer.deserializeInto(state, option);
return TextWithImportsImpl.fromXExpression(state.toXExpression());
}
}
return null;
}
Aggregations