Source:
public static void refreshVisuals(final IDiagramListEditPart self) { final DDiagramElement diagElement = self.resolveDiagramElement(); if (diagElement instanceof DNodeList) { final DNodeList list = (DNodeList) diagElement; ((Shape) self.getPrimaryShape()).setLineWidth(list.getLineWidth()); if (list.getLineWidth() == 0) { ((Shape) self.getPrimaryShape()).setOutline(false); } if (self.getBackgroundFigure() == null && list.getOwnedStyle() != null) { if (self.getBackgroundFigure() != null) { self.getFigure().add(self.getBackgroundFigure(), 0); } } ContainerStyle style = list.getOwnedStyle(); ViewNodeContainerFigureDesc primaryShape = self.getPrimaryShape(); int borderSize = 0; if (style != null && style.getBorderSize() != null) { borderSize = style == null ? 0 : style.getBorderSize().intValue(); } if (borderSize == 0) { borderSize = 1; } if (borderSize > 0) { if (primaryShape instanceof Shape) { ((Shape) primaryShape).setLineWidth(borderSize); } else if (primaryShape instanceof NodeFigure) { ((NodeFigure) primaryShape).setLineWidth(borderSize); } if (primaryShape != null && primaryShape.getBorder() instanceof LineBorder) { ((LineBorder) primaryShape.getBorder()).setWidth(borderSize); } else if (primaryShape != null && primaryShape.getBorder() instanceof MarginBorder) { primaryShape.setBorder(new MarginBorder(borderSize + IContainerLabelOffsets.LABEL_OFFSET - 1, borderSize, borderSize, borderSize)); } } if (style instanceof FlatContainerStyle) { final RGBValues rgb = ((FlatContainerStyle) style).getForegroundColor(); if (rgb != null && primaryShape instanceof GradientRoundedRectangle) { ((GradientRoundedRectangle) primaryShape).setGradientColor(VisualBindingManager.getDefault().getColorFromRGBValues(rgb)); ((GradientRoundedRectangle) primaryShape).setCornerDimensions(DiagramContainerEditPartOperation.getCornerDimension(self)); } } } if (diagElement != null) { self.setTooltipText(diagElement.getTooltipText()); DiagramListEditPartOperation.refreshLabelAlignment(self, diagElement); } }

Target:
public static void refreshVisuals(final IDiagramListEditPart self) { final DDiagramElement diagElement = self.resolveDiagramElement(); if (diagElement instanceof DNodeList) { final DNodeList list = (DNodeList) diagElement; ((Shape) self.getPrimaryShape()).setLineWidth(list.getLineWidth()); if (list.getLineWidth() == 0) { ((Shape) self.getPrimaryShape()).setOutline(false); } if (self.getBackgroundFigure() == null && list.getOwnedStyle() != null) { if (self.getBackgroundFigure() != null) { self.getFigure().add(self.getBackgroundFigure(), 0); } } ContainerStyle style = list.getOwnedStyle(); ViewNodeContainerFigureDesc primaryShape = self.getPrimaryShape(); int borderSize = 0; if (style != null && style.getBorderSize() != null) { borderSize = style.getBorderSize().intValue(); } if (borderSize == 0) { borderSize = 1; } if (borderSize > 0) { if (primaryShape instanceof Shape) { ((Shape) primaryShape).setLineWidth(borderSize); } else if (primaryShape instanceof NodeFigure) { ((NodeFigure) primaryShape).setLineWidth(borderSize); } if (primaryShape != null && primaryShape.getBorder() instanceof LineBorder) { ((LineBorder) primaryShape.getBorder()).setWidth(borderSize); } else if (primaryShape != null && primaryShape.getBorder() instanceof MarginBorder) { primaryShape.setBorder(new MarginBorder(borderSize + IContainerLabelOffsets.LABEL_OFFSET - 1, borderSize, borderSize, borderSize)); } } if (style instanceof FlatContainerStyle) { final RGBValues rgb = ((FlatContainerStyle) style).getForegroundColor(); if (rgb != null && primaryShape instanceof GradientRoundedRectangle) { ((GradientRoundedRectangle) primaryShape).setGradientColor(VisualBindingManager.getDefault().getColorFromRGBValues(rgb)); ((GradientRoundedRectangle) primaryShape).setCornerDimensions(DiagramContainerEditPartOperation.getCornerDimension(self)); } } } if (diagElement != null) { self.setTooltipText(diagElement.getTooltipText()); DiagramListEditPartOperation.refreshLabelAlignment(self, diagElement); } }