private Element getWorkspaceDataForController(
     String controllerName, DrawingController controller) {
   Element controllerElement = new Element(controllerName);
   controllerElement.setAttribute(
       workspaceShowDependencies, "" + controller.areDependenciesShown());
   controllerElement.setAttribute(workspaceShowViolations, "" + controller.areViolationsShown());
   controllerElement.setAttribute(workspaceSmartLines, "" + controller.areSmartLinesOn());
   controllerElement.setAttribute(workspaceSmartLines, "" + controller.areSmartLinesOn());
   controllerElement.setAttribute(
       workspaceLayoutStrategy, controller.getLayoutStrategy().toString());
   return controllerElement;
 }
  private void loadWorkspaceDataForController(DrawingController controller, Element data) {
    if (isActive(data, workspaceShowDependencies)) controller.showDependencies();
    else controller.hideDependencies();

    if (isActive(data, workspaceShowViolations)) controller.showViolations();
    else controller.hideViolations();

    if (isActive(data, workspaceSmartLines)) controller.showSmartLines();
    else controller.hideSmartLines();

    DrawingLayoutStrategy selectedStrategy = null;
    for (DrawingLayoutStrategy strategy : DrawingLayoutStrategy.values())
      if (strategy.toString().equals(data.getAttribute(workspaceLayoutStrategy).getValue()))
        selectedStrategy = strategy;
    if (null != selectedStrategy) controller.changeLayoutStrategy(selectedStrategy);
  }