//# 0 errors, 20 messages
//#
/*
    //#LoggingSwingWorker.java:1:1: class: com.dmdirc.addons.ui_swing.components.LoggingSwingWorker
    //#LoggingSwingWorker.java:1:1: method: com.dmdirc.addons.ui_swing.components.LoggingSwingWorker.com.dmdirc.addons.ui_swing.components.LoggingSwingWorker__static_init
 * Copyright (c) 2006-2009 Chris Smith, Shane Mc Cormack, Gregory Holmes
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

package com.dmdirc.addons.ui_swing.components;

import com.dmdirc.logger.ErrorLevel;
import com.dmdirc.logger.Logger;

import java.util.concurrent.ExecutionException;

import javax.swing.SwingWorker;

/**
 * Logging swing worker
 *
 * @param <T> Return type for the doneInBackground method
 * @param <V> Return type for the progress and publish
 */
public abstract class LoggingSwingWorker<T, V> extends SwingWorker<T, V> {
    //#LoggingSwingWorker.java:38: method: void com.dmdirc.addons.ui_swing.components.LoggingSwingWorker.com.dmdirc.addons.ui_swing.components.LoggingSwingWorker()
    //#input(void com.dmdirc.addons.ui_swing.components.LoggingSwingWorker()): this
    //#LoggingSwingWorker.java:38: end of method: void com.dmdirc.addons.ui_swing.components.LoggingSwingWorker.com.dmdirc.addons.ui_swing.components.LoggingSwingWorker()

    /** {@inheritDoc} */
    @Override
    protected void done() {
        if (isCancelled()) {
    //#LoggingSwingWorker.java:43: method: void com.dmdirc.addons.ui_swing.components.LoggingSwingWorker.done()
    //#LoggingSwingWorker.java:43: Warning: method not available - call not analyzed
    //#    call on bool com.dmdirc.addons.ui_swing.components.LoggingSwingWorker:isCancelled()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.LoggingSwingWorker
    //#    method: void done()
    //#    unanalyzed callee: bool com.dmdirc.addons.ui_swing.components.LoggingSwingWorker:isCancelled()
    //#input(void done()): com.dmdirc.logger.ErrorLevel.MEDIUM
    //#input(void done()): this
    //#presumption(void done()): init'ed(com.dmdirc.logger.ErrorLevel.MEDIUM)
    //#test_vector(void done()): com.dmdirc.addons.ui_swing.components.LoggingSwingWorker:isCancelled(...)@43: {0}, {1}
            return;
        }
        try {
            get();
    //#LoggingSwingWorker.java:47: Warning: method not available - call not analyzed
    //#    call on Object com.dmdirc.addons.ui_swing.components.LoggingSwingWorker:get()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.LoggingSwingWorker
    //#    method: void done()
    //#    unanalyzed callee: Object com.dmdirc.addons.ui_swing.components.LoggingSwingWorker:get()
        } catch (InterruptedException ex) {
        //Ignore
        } catch (ExecutionException ex) {
            Logger.appError(ErrorLevel.MEDIUM, ex.getMessage(), ex);
    //#LoggingSwingWorker.java:51: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.logger.Logger:appError(ErrorLevel, String, Throwable)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.ui_swing.components.LoggingSwingWorker
    //#    method: void done()
    //#    unanalyzed callee: void com.dmdirc.logger.Logger:appError(ErrorLevel, String, Throwable)
        }
    }
    //#LoggingSwingWorker.java:53: end of method: void com.dmdirc.addons.ui_swing.components.LoggingSwingWorker.done()
}
    //#output(com.dmdirc.addons.ui_swing.components.LoggingSwingWorker__static_init): __Descendant_Table[com/dmdirc/addons/ui_swing/components/LoggingSwingWorker]
    //#output(com.dmdirc.addons.ui_swing.components.LoggingSwingWorker__static_init): __Dispatch_Table.done()V
    //#post(com.dmdirc.addons.ui_swing.components.LoggingSwingWorker__static_init): __Descendant_Table[com/dmdirc/addons/ui_swing/components/LoggingSwingWorker] == &__Dispatch_Table
    //#post(com.dmdirc.addons.ui_swing.components.LoggingSwingWorker__static_init): __Dispatch_Table.done()V == &done
    //#LoggingSwingWorker.java:: end of method: com.dmdirc.addons.ui_swing.components.LoggingSwingWorker.com.dmdirc.addons.ui_swing.components.LoggingSwingWorker__static_init
    //#LoggingSwingWorker.java:: end of class: com.dmdirc.addons.ui_swing.components.LoggingSwingWorker
