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;
005    
006    import graphlab.platform.plugin.PluginMethods;
007    import graphlab.plugins.commonplugin.reporter.actions.Report;
008    
009    import java.net.URL;
010    
011    /**
012     * @author azin azadi
013    
014     */
015    public class ReporterPluginMethods implements PluginMethods {
016    
017    //    /**
018    //     * opens a browser for displaing the given htmltext
019    //     * it first tries to open an external browser then internal one
020    //     *
021    //     * @return true if successfull
022    //     */
023    //    public boolean browse(String htmlText) {
024    //        return Browser.browse(htmlText);
025    //    }
026    
027        /**
028         * opens a browser for displaing the given url
029         * it first tries to open an external browser then internal one
030         *
031         * @return true if successfull
032         */
033        public boolean browse(URL url) {
034            return Browser.browse(url);
035        }
036    
037        /**
038         * opens a browser window to report a bug to server
039         * ## it is also possible to have a more control on the opening page, the operation are similar to ExceptionReport
040         */
041        public void showBugBuddy() {
042            Report.showBugBuddy();
043        }
044    }