Search in sources :

Example 1 with IDisposable

use of org.eclipse.ui.services.IDisposable in project dbeaver by serge-rider.

the class DBeaverUI method dispose.

private void dispose() {
    this.sharedTextColors.dispose();
    if (trayItem != null) {
        trayItem.hide();
    }
    List<IDisposable> dispList = new ArrayList<>(globalDisposables);
    Collections.reverse(dispList);
    for (IDisposable disp : dispList) {
        try {
            disp.dispose();
        } catch (Exception e) {
            log.error(e);
        }
        globalDisposables.remove(disp);
    }
}
Also used : ArrayList(java.util.ArrayList) IDisposable(org.eclipse.ui.services.IDisposable) InvocationTargetException(java.lang.reflect.InvocationTargetException) DBException(org.jkiss.dbeaver.DBException)

Aggregations

InvocationTargetException (java.lang.reflect.InvocationTargetException)1 ArrayList (java.util.ArrayList)1 IDisposable (org.eclipse.ui.services.IDisposable)1 DBException (org.jkiss.dbeaver.DBException)1