@NotNull @Override public Document createDocument(@NotNull Project project, @NotNull XExpression expression, @Nullable XSourcePosition sourcePosition, @NotNull EvaluationMode mode) { // TODO: Return a proper value return EditorFactory.getInstance().createDocument(expression.getExpression()); } }
@Override public void setValue(@NotNull XExpression expression, @NotNull XModificationCallback callback) { // TODO: Format the expression properly m_gdb.sendCommand("-var-assign " + m_variableObject.name + " " + expression.getExpression(), event -> onGdbNewValueReady(event, callback)); }
@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(); } } } }
XExpression logExpressionObject = breakpoint.getLogExpressionObject(); if (logExpressionObject != null) { descriptor.action = logExpressionObject.getExpression(); descriptor.condition = conditionExpression != null ? conditionExpression.getExpression() : ""; return descriptor;
mock(XLineBreakpointImpl.class); XExpression expression = mock(XExpression.class); when(expression.getExpression()).thenReturn(condition); when(lineBreakpoint.getConditionExpression()).thenReturn(expression); when(lineBreakpoint.getProperties()).thenReturn(properties);
serverNewBreakpoint.setLocation(location); if (ideBreakpoint.getConditionExpression() != null) { serverNewBreakpoint.setCondition(ideBreakpoint.getConditionExpression().getExpression());