Package com.tagtraum.perf.gcviewer.log

Examples of com.tagtraum.perf.gcviewer.log.TextAreaLogHandler


        this.modelChartAndDetailsPanel.addTab(LocalisationHelper.getString("data_panel_tab_chart"), modelChart);
        this.modelChartAndDetailsPanel.addTab(LocalisationHelper.getString("data_panel_tab_details"), modelDetailsScrollPane);
       
        this.viewBar = new ViewBar(this);
        this.propertyChangeSupport = new SwingPropertyChangeSupport(this);
        this.textAreaLogHandler = new TextAreaLogHandler();
        dataReaderFacade = new DataReaderFacade();
        final GCModel model = dataReaderFacade.loadModel(url, true, gcDocument);
        setModel(model);
        // TODO delete
        model.printDetailedInformation();
View Full Code Here


     * @throws DataReaderException if any exception occurred, it is logged and added as the cause
     * to this exception
     */
    public GCModel loadModel(URL url, boolean showErrorDialog, Component parent) throws DataReaderException {
        // set up special handler
        TextAreaLogHandler textAreaLogHandler = new TextAreaLogHandler();
        PARSER_LOGGER.addHandler(textAreaLogHandler);
        DataReaderException dataReaderException = new DataReaderException();
        GCModel model = null;
        try {
            LOGGER.info("GCViewer version " + BuildInfoReader.getVersion() + " (" + BuildInfoReader.getBuildDate() + ")");
            model = readModel(url);
            model.setURL(url);
        }
        catch (RuntimeException | IOException e) {
            LOGGER.severe(LocalisationHelper.getString("fileopen_dialog_read_file_failed")
                    + "\n" + e.toString() + " " + e.getLocalizedMessage());
            dataReaderException.initCause(e);
        }
        finally {
            // remove special handler after we are done with reading.
            PARSER_LOGGER.removeHandler(textAreaLogHandler);
        }

        if (textAreaLogHandler.hasErrors() && showErrorDialog) {
            showErrorDialog(url, textAreaLogHandler, parent);
        }
       
        if (dataReaderException.getCause() != null) {
            throw dataReaderException;
View Full Code Here

TOP

Related Classes of com.tagtraum.perf.gcviewer.log.TextAreaLogHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.