use of com.google.cloud.tools.intellij.debugger.CloudLineBreakpointProperties in project google-cloud-intellij by GoogleCloudPlatform.
the class BreakpointConfigurationPanel method saveTo.
@SuppressWarnings("ConstantConditions")
@Override
public void saveTo(@NotNull final XLineBreakpoint<CloudLineBreakpointProperties> ideBreakpoint) {
CloudLineBreakpointProperties properties = ideBreakpoint.getProperties();
if (properties == null) {
LOG.error("Could not save changes to the breakpoint because for some reason it does not have cloud " + "properties.");
return;
}
XBreakpointBase lineBreakpointImpl = ideBreakpoint instanceof XBreakpointBase ? (XBreakpointBase) ideBreakpoint : null;
if (rootNode != null && lineBreakpointImpl != null) {
List<String> expressionsToSave = new ArrayList<String>();
List<? extends WatchNode> children = rootNode.getAllChildren();
if (children != null) {
for (WatchNode node : rootNode.getAllChildren()) {
expressionsToSave.add(node.getExpression().getExpression());
}
if (properties.setWatchExpressions(expressionsToSave.toArray(new String[expressionsToSave.size()]))) {
lineBreakpointImpl.fireBreakpointChanged();
}
}
}
}
Aggregations