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.graphgenerator; 005 006 import graphlab.platform.core.BlackBoard; 007 import graphlab.platform.extension.ExtensionLoader; 008 import graphlab.platform.plugin.PluginInterface; 009 import graphlab.plugins.graphgenerator.core.extension.GraphGeneratorExtensionHandler; 010 import graphlab.ui.UI; 011 import org.xml.sax.SAXException; 012 013 import java.io.IOException; 014 015 /** 016 * @author Reza Mohammadi 017 */ 018 public class Init implements PluginInterface { 019 static { 020 ExtensionLoader.registerExtensionHandler(new GraphGeneratorExtensionHandler()); 021 } 022 023 public void init(BlackBoard blackboard) { 024 UI ui = blackboard.getData(UI.name); 025 try { 026 ui.addXML("/graphlab/plugins/graphgenerator/GeneratorUI.xml", getClass()); 027 } catch (IOException e) { 028 e.printStackTrace(); 029 System.err.println("xml file was not found , or IO error"); 030 } catch (SAXException e) { 031 e.printStackTrace(); 032 } 033 } 034 }