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.commonplugin.help; 005 006 import graphlab.platform.core.BlackBoard; 007 import graphlab.platform.plugin.PluginInterface; 008 import graphlab.ui.UI; 009 import org.xml.sax.SAXException; 010 011 import java.io.IOException; 012 013 /** 014 * @author Reza Mohammadi 015 */ 016 public class Init implements PluginInterface { 017 018 public final static String filter = "graphlab/plugins/commonplugin/help/content"; 019 020 public void init(BlackBoard blackboard) { 021 // Utils.registerHelpPlugin(blackboard, "main", "GraphLab's Main Help", filter); 022 023 UI ui = (UI) blackboard.getData(UI.name); 024 try { 025 ui.addXML("/graphlab/plugins/commonplugin/help/config.xml", getClass()); 026 } catch (IOException e) { 027 e.printStackTrace(); 028 System.out.println("xml file was not found , or IO error"); 029 } catch (SAXException e) { 030 e.printStackTrace(); 031 } 032 } 033 }