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.reporter.actions;
005    
006    import graphlab.platform.core.AbstractAction;
007    import graphlab.platform.core.BlackBoard;
008    import graphlab.plugins.commonplugin.reporter.Browser;
009    import graphlab.ui.UIUtils;
010    import graphlab.ui.extension.UIActionExtension;
011    
012    import java.net.URL;
013    import java.net.MalformedURLException;
014    
015    public class Report implements UIActionExtension {
016    
017    //    public static final String EVENT_KEY = UIUtils.getUIEventKey("Bug Buddy");
018    
019    //    public Report(BlackBoard bb) {
020    //        super(bb);
021    //        listen4Event(EVENT_KEY);
022    //    }
023    
024    //    public void performAction(String eventName, Object value) {
025    //        Browser b = new Browser();
026    //        b.pack();
027    //        b.setVisible(true);
028    //    }
029    
030        public static void showBugBuddy() {
031            Browser.browse(Browser.header + Browser.footer);
032        }
033    
034        public void actionPerformed(BlackBoard blackBoard) {
035            try {
036                Browser.browse(new URL("http://graphlab.sharif.ir/trac/newticket"));
037            } catch (MalformedURLException e) {
038                e.printStackTrace();
039            }
040        }
041    }