Search in sources :

Example 1 with ModelActivator

use of org.jkiss.dbeaver.bundle.ModelActivator in project dbeaver by serge-rider.

the class Log method writeExceptionStatus.

private static void writeExceptionStatus(int severity, Object message, Throwable t) {
    debugMessage(message, t, System.err);
    ModelActivator activator = ModelActivator.getInstance();
    if (activator != null) {
        // Activator may be null in some unclear circumstances (like shutdown is in progress)
        ILog log = activator.getLog();
        if (log != null) {
            if (t == null) {
                log.log(new Status(severity, corePluginID, message == null ? null : message.toString()));
            } else {
                if (message == null) {
                    log.log(GeneralUtils.makeExceptionStatus(severity, t));
                } else {
                    log.log(GeneralUtils.makeExceptionStatus(severity, message.toString(), t));
                }
            }
        }
    }
}
Also used : Status(org.eclipse.core.runtime.Status) ILog(org.eclipse.core.runtime.ILog) ModelActivator(org.jkiss.dbeaver.bundle.ModelActivator)

Example 2 with ModelActivator

use of org.jkiss.dbeaver.bundle.ModelActivator in project dbeaver by serge-rider.

the class Log method debug.

public void debug(Object message, Throwable t) {
    ModelActivator activator = ModelActivator.getInstance();
    debugMessage(message, t, System.err);
//        if (activator != null) {
//            debugMessage(message, t, activator.getDebugWriter());
//        }
}
Also used : ModelActivator(org.jkiss.dbeaver.bundle.ModelActivator)

Aggregations

ModelActivator (org.jkiss.dbeaver.bundle.ModelActivator)2 ILog (org.eclipse.core.runtime.ILog)1 Status (org.eclipse.core.runtime.Status)1