package com.github.ferstl.depgraph.graph;

import java.util.Map;
import org.yaml.snakeyaml.DumperOptions;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.introspector.BeanAccess;
import com.google.common.collect.ImmutableMap;
import com.google.gson.FieldNamingPolicy;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

public class StyleConfiguration {

  NodeConfiguration defaultNodeConfiguration = new NodeConfiguration();
  Map<String, NodeConfiguration> scopeNodeConfiguration = ImmutableMap.of("compile", new NodeConfiguration(), "test", new NodeConfiguration());

  static class NodeConfiguration {

    String shape = "polygon";
    int sides = 4;
    String color = "red";
    Font font = new Font();

  }

  static class Font {

    String color = "black";
    int size = 14;
    String name = "Helvetica";
  }
}

@@ -444,16 +444,88 @@
 tion();%0A
+  EdgeConfiguration defaultEdgeConfiguration = new EdgeConfiguration();%0A
   Map%3CSt
@@ -660,16 +660,976 @@
 ion());%0A
+  Map%3CNodeResolution, EdgeConfiguration%3E edgeTypeConfiguration = ImmutableMap.of(NodeResolution.INCLUDED, new EdgeConfiguration(), NodeResolution.OMITTED_FOR_DUPLICATE, new EdgeConfiguration());%0A%0A%0A  public static void main(String%5B%5D args) %7B%0A    createGson();%0A    // createYaml();%0A  %7D%0A%0A  private static void createGson() %7B%0A    Gson gson = new GsonBuilder()%0A        .setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_DASHES)%0A        .setPrettyPrinting()%0A        .create();%0A%0A    // NodeConfiguration%5B%5D c = new NodeConfiguration%5B%5D%7Bnew NodeConfiguration(), new NodeConfiguration(), new%0A    // NodeConfiguration()%7D;%0A    // System.out.println(gson.toJson(c));%0A    System.out.println(gson.toJson(new StyleConfiguration()));%0A  %7D%0A%0A  private static void createYaml() %7B%0A    DumperOptions options = new DumperOptions();%0A%0A    Yaml yaml = new Yaml(options);%0A    yaml.setBeanAccess(BeanAccess.FIELD);%0A    System.out.println(yaml.dumpAsMap(new StyleConfiguration()));%0A  %7D%0A%0A
 %0A  stati
@@ -1760,16 +1760,141 @@
 Font();%0A
+  %7D%0A%0A  static class EdgeConfiguration %7B%0A%0A    String style = %22dotted%22;%0A    String color = %22black%22;%0A    Font font = new Font();
 %0A  %7D%0A%0A  

Add edge configuration