public static boolean isSameDecoration(IDecoration oldDecoration, String newId) { if (newId != null) { if (oldDecoration == null) return false; String oldId = oldDecoration.getId(); return newId.equals(oldId); } return oldDecoration == null; }
public static IDecoration createDecoration(IGraphicalPart part, String id) { IDecoration decoration = MindMapUI.getMindMapDecorationFactory().createDecoration(id, part); if (decoration != null) decoration.setId(id); return decoration; }