Search in sources :

Example 1 with ResourceHandlerDescriptor

use of org.jkiss.dbeaver.registry.ResourceHandlerDescriptor in project dbeaver by serge-rider.

the class PrefPageProjectSettings method performDefaults.

@Override
protected void performDefaults() {
    resourceTable.removeAll();
    for (ResourceHandlerDescriptor descriptor : DBeaverCore.getInstance().getProjectRegistry().getResourceHandlers()) {
        if (!descriptor.isManagable()) {
            continue;
        }
        TableItem item = new TableItem(resourceTable, SWT.NONE);
        item.setData(descriptor);
        final DBPImage icon = descriptor.getIcon();
        if (icon != null) {
            item.setImage(DBeaverIcons.getImage(icon));
        }
        item.setText(0, descriptor.getName());
        if (descriptor.getDefaultRoot() != null) {
            item.setText(1, descriptor.getDefaultRoot());
        }
    }
    UIUtils.packColumns(resourceTable, true);
    super.performDefaults();
}
Also used : ResourceHandlerDescriptor(org.jkiss.dbeaver.registry.ResourceHandlerDescriptor) DBPImage(org.jkiss.dbeaver.model.DBPImage)

Aggregations

DBPImage (org.jkiss.dbeaver.model.DBPImage)1 ResourceHandlerDescriptor (org.jkiss.dbeaver.registry.ResourceHandlerDescriptor)1