private void command_ANCHOR_vertical(WidgetInfo widget, Anchor anchor) throws Exception {
MethodInvocation invocation;
Rectangle bounds = widget.getBounds();
AstEditor editor = getEditor();
if ((invocation = getWidgetInvocation(widget, "setWidgetTopHeight")) != null) {
int bottom = getBounds().height - bounds.bottom();
if (anchor == Anchor.NONE) {
editor.removeEnclosingStatement(invocation);
}
if (anchor == Anchor.TRAILING) {
editor.replaceInvocationName(invocation, "setWidgetBottomHeight");