use of com.google.inject.grapher.graphviz.GraphvizGrapher in project runelite by runelite.
the class PluginManagerTest method dumpGraph.
@Test
public void dumpGraph() throws Exception {
List<Module> modules = new ArrayList<>();
modules.add(new GraphvizModule());
modules.add(new RuneLiteModule());
runelite.setClient(client);
PluginManager pluginManager = new PluginManager();
pluginManager.loadCorePlugins();
for (Plugin p : pluginManager.getPlugins()) {
modules.add(p);
}
File file = folder.newFile();
try (PrintWriter out = new PrintWriter(file, "UTF-8")) {
Injector injector = Guice.createInjector(modules);
GraphvizGrapher grapher = injector.getInstance(GraphvizGrapher.class);
grapher.setOut(out);
grapher.setRankdir("TB");
grapher.graph(injector);
}
}
use of com.google.inject.grapher.graphviz.GraphvizGrapher in project pinpoint by naver.
the class Grapher method graph.
public void graph(String filename, Injector demoInjector) throws IOException {
PrintWriter out = new PrintWriter(filename, StandardCharsets.UTF_8.name());
Injector injector = Guice.createInjector(new GraphvizModule());
GraphvizGrapher grapher = injector.getInstance(GraphvizGrapher.class);
grapher.setOut(out);
grapher.setRankdir("TB");
grapher.graph(demoInjector);
}
use of com.google.inject.grapher.graphviz.GraphvizGrapher in project guice by google.
the class InjectorGrapherDemo method main.
public static void main(String[] args) throws Exception {
// TODO(user): Switch to Stage.TOOL when issue 297 is fixed.
Injector demoInjector = Guice.createInjector(Stage.DEVELOPMENT, new BackToTheFutureModule(), new MultibinderModule(), new PrivateTestModule());
PrintWriter out = new PrintWriter(new File(args[0]), "UTF-8");
Injector injector = Guice.createInjector(new GraphvizModule());
GraphvizGrapher grapher = injector.getInstance(GraphvizGrapher.class);
grapher.setOut(out);
grapher.setRankdir("TB");
grapher.graph(demoInjector);
}
use of com.google.inject.grapher.graphviz.GraphvizGrapher in project roboguice by roboguice.
the class InjectorGrapherDemo method main.
public static void main(String[] args) throws Exception {
// TODO(phopkins): Switch to Stage.TOOL when issue 297 is fixed.
Injector demoInjector = Guice.createInjector(Stage.DEVELOPMENT, new BackToTheFutureModule(), new MultibinderModule(), new PrivateTestModule());
PrintWriter out = new PrintWriter(new File(args[0]), "UTF-8");
Injector injector = Guice.createInjector(new GraphvizModule());
GraphvizGrapher grapher = injector.getInstance(GraphvizGrapher.class);
grapher.setOut(out);
grapher.setRankdir("TB");
grapher.graph(demoInjector);
}
Aggregations