001 // GraphLab Project: http://graphlab.sharif.edu 002 // Copyright (C) 2008 Mathematical Science Department of Sharif University of Technology 003 // Distributed under the terms of the GNU General Public License (GPL): http://www.gnu.org/licenses/ 004 package graphlab.plugins.reports; 005 006 import graphlab.platform.core.BlackBoard; 007 import graphlab.platform.extension.ExtensionLoader; 008 import graphlab.platform.plugin.PluginInterface; 009 import graphlab.plugins.reports.extension.GraphReportExtensionHandler; 010 import graphlab.ui.UI; 011 012 /** 013 * @author azin 014 */ 015 public class Init implements PluginInterface { 016 static { 017 ExtensionLoader.registerExtensionHandler(new GraphReportExtensionHandler()); 018 } 019 020 public void init(BlackBoard blackboard) { 021 UI ui = (UI) blackboard.getData(UI.name); 022 try { 023 ui.addXML("/graphlab/plugins/reports/config.xml", getClass()); 024 } catch (Exception e) { 025 e.printStackTrace(); 026 System.out.println("xml file was not found , or IO error"); 027 } 028 } 029 }