Search in sources :

Example 1 with CustomSashForm

use of org.jkiss.dbeaver.ui.controls.CustomSashForm in project dbeaver by serge-rider.

the class MySQLExportWizardPageObjects method createControl.

@Override
public void createControl(Composite parent) {
    Composite composite = UIUtils.createPlaceholder(parent, 1);
    Group objectsGroup = UIUtils.createControlGroup(composite, MySQLUIMessages.tools_db_export_wizard_page_settings_group_objects, 1, GridData.FILL_HORIZONTAL, 0);
    objectsGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
    SashForm sash = new CustomSashForm(objectsGroup, SWT.VERTICAL);
    sash.setLayoutData(new GridData(GridData.FILL_BOTH));
    {
        Composite catPanel = UIUtils.createComposite(sash, 1);
        catPanel.setLayoutData(new GridData(GridData.FILL_BOTH));
        catalogTable = new Table(catPanel, SWT.BORDER | SWT.CHECK);
        catalogTable.addListener(SWT.Selection, event -> {
            TableItem item = (TableItem) event.item;
            if (item != null) {
                MySQLCatalog catalog = (MySQLCatalog) item.getData();
                if (event.detail == SWT.CHECK) {
                    catalogTable.select(catalogTable.indexOf(item));
                    checkedObjects.remove(catalog);
                }
                loadTables(catalog);
                updateState();
            }
        });
        GridData gd = new GridData(GridData.FILL_BOTH);
        gd.heightHint = 50;
        catalogTable.setLayoutData(gd);
        Composite buttonsPanel = UIUtils.createComposite(catPanel, 3);
        buttonsPanel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
        new Label(buttonsPanel, SWT.NONE).setLayoutData(new GridData(GridData.GRAB_HORIZONTAL));
        createCheckButtons(buttonsPanel, catalogTable);
    }
    {
        Composite tablesPanel = UIUtils.createComposite(sash, 1);
        tablesPanel.setLayoutData(new GridData(GridData.FILL_BOTH));
        tablesTable = new Table(tablesPanel, SWT.BORDER | SWT.CHECK);
        GridData gd = new GridData(GridData.FILL_BOTH);
        gd.heightHint = 50;
        tablesTable.setLayoutData(gd);
        tablesTable.addListener(SWT.Selection, event -> {
            if (event.detail == SWT.CHECK) {
                updateCheckedTables();
                updateState();
            }
        });
        Composite buttonsPanel = UIUtils.createComposite(tablesPanel, 3);
        buttonsPanel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
        exportViewsCheck = UIUtils.createCheckbox(buttonsPanel, "Show views", false);
        exportViewsCheck.addSelectionListener(new SelectionAdapter() {

            @Override
            public void widgetSelected(SelectionEvent e) {
                wizard.getSettings().setShowViews(exportViewsCheck.getSelection());
                loadTables(null);
            }
        });
        exportViewsCheck.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL));
        createCheckButtons(buttonsPanel, tablesTable);
    }
    loadSettings();
    setControl(composite);
}
Also used : DBWorkbench(org.jkiss.dbeaver.runtime.DBWorkbench) java.util(java.util) MySQLDatabaseExportInfo(org.jkiss.dbeaver.ext.mysql.tasks.MySQLDatabaseExportInfo) SashForm(org.eclipse.swt.custom.SashForm) MySQLTableBase(org.jkiss.dbeaver.ext.mysql.model.MySQLTableBase) AbstractJob(org.jkiss.dbeaver.model.runtime.AbstractJob) MySQLDataSource(org.jkiss.dbeaver.ext.mysql.model.MySQLDataSource) IStatus(org.eclipse.core.runtime.IStatus) DBeaverIcons(org.jkiss.dbeaver.ui.DBeaverIcons) UIUtils(org.jkiss.dbeaver.ui.UIUtils) DBRProgressMonitor(org.jkiss.dbeaver.model.runtime.DBRProgressMonitor) GridData(org.eclipse.swt.layout.GridData) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) CommonUtils(org.jkiss.utils.CommonUtils) DBUtils(org.jkiss.dbeaver.model.DBUtils) org.eclipse.swt.widgets(org.eclipse.swt.widgets) Status(org.eclipse.core.runtime.Status) MySQLUIMessages(org.jkiss.dbeaver.ext.mysql.ui.internal.MySQLUIMessages) List(java.util.List) MySQLCatalog(org.jkiss.dbeaver.ext.mysql.model.MySQLCatalog) DBIcon(org.jkiss.dbeaver.model.DBIcon) DBException(org.jkiss.dbeaver.DBException) CustomSashForm(org.jkiss.dbeaver.ui.controls.CustomSashForm) SWT(org.eclipse.swt.SWT) SelectionEvent(org.eclipse.swt.events.SelectionEvent) SashForm(org.eclipse.swt.custom.SashForm) CustomSashForm(org.jkiss.dbeaver.ui.controls.CustomSashForm) CustomSashForm(org.jkiss.dbeaver.ui.controls.CustomSashForm) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) GridData(org.eclipse.swt.layout.GridData) MySQLCatalog(org.jkiss.dbeaver.ext.mysql.model.MySQLCatalog) SelectionEvent(org.eclipse.swt.events.SelectionEvent)

Example 2 with CustomSashForm

use of org.jkiss.dbeaver.ui.controls.CustomSashForm in project dbeaver by serge-rider.

the class PrefPageProjectNetworkProfiles method createContents.

@Override
protected Control createContents(final Composite parent) {
    CustomSashForm divider = UIUtils.createPartDivider(null, parent, SWT.HORIZONTAL);
    {
        Composite profilesGroup = new Composite(divider, SWT.BORDER);
        GridLayout gl = new GridLayout(1, false);
        gl.marginWidth = 0;
        gl.marginHeight = 0;
        profilesGroup.setLayout(gl);
        GridData gd = new GridData(GridData.FILL_BOTH);
        profilesGroup.setLayoutData(gd);
        {
            ToolBar toolbar = new ToolBar(profilesGroup, SWT.HORIZONTAL | SWT.RIGHT);
            UIUtils.createToolItem(toolbar, "Create", "Create new profile", UIIcon.ROW_ADD, new SelectionAdapter() {

                @Override
                public void widgetSelected(SelectionEvent e) {
                    String profileName = "";
                    while (true) {
                        profileName = EnterNameDialog.chooseName(getShell(), "Profile name", profileName);
                        if (CommonUtils.isEmptyTrimmed(profileName)) {
                            return;
                        }
                        if (projectMeta.getDataSourceRegistry().getNetworkProfile(profileName) != null) {
                            UIUtils.showMessageBox(getShell(), "Wrong profile name", "Profile '" + profileName + "' already exist in project '" + projectMeta.getName() + "'", SWT.ICON_ERROR);
                            continue;
                        }
                        break;
                    }
                    DBWNetworkProfile newProfile = new DBWNetworkProfile();
                    newProfile.setProfileName(profileName);
                    projectMeta.getDataSourceRegistry().updateNetworkProfile(newProfile);
                    projectMeta.getDataSourceRegistry().flushConfig();
                    TableItem item = new TableItem(profilesTable, SWT.NONE);
                    item.setText(newProfile.getProfileName());
                    item.setImage(DBeaverIcons.getImage(DBIcon.TYPE_DOCUMENT));
                    item.setData(newProfile);
                    if (profilesTable.getItemCount() == 1) {
                        selectedProfile = newProfile;
                        profilesTable.select(0);
                        updateControlsState();
                    }
                }
            });
            UIUtils.createToolItem(toolbar, "Delete", "Delete profile", UIIcon.ROW_DELETE, new SelectionAdapter() {

                @Override
                public void widgetSelected(SelectionEvent e) {
                    if (selectedProfile != null) {
                        List<? extends DBPDataSourceContainer> usedBy = projectMeta.getDataSourceRegistry().getDataSourcesByProfile(selectedProfile);
                        if (!usedBy.isEmpty()) {
                            UIUtils.showMessageBox(getShell(), "Can't delete profile", "Configuration profile '" + selectedProfile.getProfileName() + "' used by " + usedBy.size() + " connections:\n" + usedBy, SWT.ICON_ERROR);
                            return;
                        }
                        if (!UIUtils.confirmAction(getShell(), "Delete profile", "Are you sure you want to delete configuration profile '" + selectedProfile.getProfileName() + "'?")) {
                            return;
                        }
                        projectMeta.getDataSourceRegistry().removeNetworkProfile(selectedProfile);
                        projectMeta.getDataSourceRegistry().flushConfig();
                        profilesTable.remove(profilesTable.getSelectionIndex());
                        selectedProfile = null;
                        updateControlsState();
                    } else {
                        UIUtils.showMessageBox(getShell(), "No profile", "Select profile first", SWT.ICON_ERROR);
                    }
                }
            });
        }
        profilesTable = new Table(profilesGroup, SWT.SINGLE);
        gd = new GridData(GridData.FILL_BOTH);
        gd.minimumWidth = 150;
        profilesTable.setLayoutData(gd);
        profilesTable.addSelectionListener(new SelectionAdapter() {

            @Override
            public void widgetSelected(SelectionEvent e) {
                saveHandlerSettings();
                TableItem[] selection = profilesTable.getSelection();
                if (ArrayUtils.isEmpty(selection)) {
                    selectedProfile = null;
                } else {
                    selectedProfile = (DBWNetworkProfile) selection[0].getData();
                }
                updateControlsState();
            }
        });
    }
    {
        handlersFolder = new TabFolder(divider, SWT.TOP | SWT.FLAT);
        handlersFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
        for (NetworkHandlerDescriptor nhd : NetworkHandlerRegistry.getInstance().getDescriptors()) {
            if (!nhd.hasObjectTypes()) {
                createHandlerTab(nhd);
            }
        }
        handlersFolder.addSelectionListener(new SelectionAdapter() {

            @Override
            public void widgetSelected(SelectionEvent e) {
                updateControlsState();
            }
        });
    }
    divider.setWeights(new int[] { 300, 700 });
    performDefaults();
    return divider;
}
Also used : DBWNetworkProfile(org.jkiss.dbeaver.model.net.DBWNetworkProfile) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) NetworkHandlerDescriptor(org.jkiss.dbeaver.registry.network.NetworkHandlerDescriptor) GridLayout(org.eclipse.swt.layout.GridLayout) CustomSashForm(org.jkiss.dbeaver.ui.controls.CustomSashForm) GridData(org.eclipse.swt.layout.GridData) SelectionEvent(org.eclipse.swt.events.SelectionEvent) List(java.util.List) DBPDataSourceContainer(org.jkiss.dbeaver.model.DBPDataSourceContainer)

Example 3 with CustomSashForm

use of org.jkiss.dbeaver.ui.controls.CustomSashForm in project dbeaver by serge-rider.

the class PostgreBackupWizardPageObjects method createControl.

@Override
public void createControl(Composite parent) {
    Composite composite = UIUtils.createPlaceholder(parent, 1);
    Group objectsGroup = UIUtils.createControlGroup(composite, PostgreMessages.wizard_backup_page_object_group_object, 1, GridData.FILL_HORIZONTAL, 0);
    objectsGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
    SashForm sash = new CustomSashForm(objectsGroup, SWT.VERTICAL);
    sash.setLayoutData(new GridData(GridData.FILL_BOTH));
    {
        Composite catPanel = UIUtils.createComposite(sash, 1);
        catPanel.setLayoutData(new GridData(GridData.FILL_BOTH));
        schemasTable = new Table(catPanel, SWT.BORDER | SWT.CHECK);
        schemasTable.addListener(SWT.Selection, event -> {
            TableItem item = (TableItem) event.item;
            PostgreSchema catalog = (PostgreSchema) item.getData();
            if (event.detail == SWT.CHECK) {
                schemasTable.select(schemasTable.indexOf(item));
                checkedObjects.remove(catalog);
            }
            loadTables(catalog);
            updateState();
        });
        GridData gd = new GridData(GridData.FILL_BOTH);
        gd.heightHint = 50;
        schemasTable.setLayoutData(gd);
        Composite buttonsPanel = UIUtils.createComposite(catPanel, 3);
        buttonsPanel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
        new Label(buttonsPanel, SWT.NONE).setLayoutData(new GridData(GridData.GRAB_HORIZONTAL));
        createCheckButtons(buttonsPanel, schemasTable);
    }
    {
        Composite tablesPanel = UIUtils.createComposite(sash, 1);
        tablesPanel.setLayoutData(new GridData(GridData.FILL_BOTH));
        tablesTable = new Table(tablesPanel, SWT.BORDER | SWT.CHECK);
        GridData gd = new GridData(GridData.FILL_BOTH);
        gd.heightHint = 50;
        tablesTable.setLayoutData(gd);
        tablesTable.addListener(SWT.Selection, event -> {
            if (event.detail == SWT.CHECK) {
                updateCheckedTables();
                updateState();
            }
        });
        Composite buttonsPanel = UIUtils.createComposite(tablesPanel, 3);
        buttonsPanel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
        exportViewsCheck = UIUtils.createCheckbox(buttonsPanel, PostgreMessages.wizard_backup_page_object_checkbox_show_view, false);
        exportViewsCheck.addSelectionListener(new SelectionAdapter() {

            @Override
            public void widgetSelected(SelectionEvent e) {
                wizard.getSettings().setShowViews(exportViewsCheck.getSelection());
                loadTables(null);
            }
        });
        exportViewsCheck.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL));
        createCheckButtons(buttonsPanel, tablesTable);
    }
    setControl(composite);
}
Also used : DBWorkbench(org.jkiss.dbeaver.runtime.DBWorkbench) java.util(java.util) SashForm(org.eclipse.swt.custom.SashForm) PostgreTableContainer(org.jkiss.dbeaver.ext.postgresql.model.PostgreTableContainer) PostgreDatabase(org.jkiss.dbeaver.ext.postgresql.model.PostgreDatabase) AbstractJob(org.jkiss.dbeaver.model.runtime.AbstractJob) IStatus(org.eclipse.core.runtime.IStatus) DBeaverIcons(org.jkiss.dbeaver.ui.DBeaverIcons) UIUtils(org.jkiss.dbeaver.ui.UIUtils) PostgreTableBase(org.jkiss.dbeaver.ext.postgresql.model.PostgreTableBase) Log(org.jkiss.dbeaver.Log) DBRProgressMonitor(org.jkiss.dbeaver.model.runtime.DBRProgressMonitor) PostgreMessages(org.jkiss.dbeaver.ext.postgresql.PostgreMessages) JDBCTable(org.jkiss.dbeaver.model.impl.jdbc.struct.JDBCTable) GridData(org.eclipse.swt.layout.GridData) PostgreDatabaseBackupInfo(org.jkiss.dbeaver.ext.postgresql.tasks.PostgreDatabaseBackupInfo) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) CommonUtils(org.jkiss.utils.CommonUtils) PostgreSchema(org.jkiss.dbeaver.ext.postgresql.model.PostgreSchema) DBUtils(org.jkiss.dbeaver.model.DBUtils) org.eclipse.swt.widgets(org.eclipse.swt.widgets) Status(org.eclipse.core.runtime.Status) AbstractNativeToolWizardPage(org.jkiss.dbeaver.tasks.ui.nativetool.AbstractNativeToolWizardPage) List(java.util.List) DBIcon(org.jkiss.dbeaver.model.DBIcon) DBException(org.jkiss.dbeaver.DBException) CustomSashForm(org.jkiss.dbeaver.ui.controls.CustomSashForm) SWT(org.eclipse.swt.SWT) SelectionEvent(org.eclipse.swt.events.SelectionEvent) VoidProgressMonitor(org.jkiss.dbeaver.model.runtime.VoidProgressMonitor) SashForm(org.eclipse.swt.custom.SashForm) CustomSashForm(org.jkiss.dbeaver.ui.controls.CustomSashForm) JDBCTable(org.jkiss.dbeaver.model.impl.jdbc.struct.JDBCTable) CustomSashForm(org.jkiss.dbeaver.ui.controls.CustomSashForm) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) GridData(org.eclipse.swt.layout.GridData) SelectionEvent(org.eclipse.swt.events.SelectionEvent) PostgreSchema(org.jkiss.dbeaver.ext.postgresql.model.PostgreSchema)

Example 4 with CustomSashForm

use of org.jkiss.dbeaver.ui.controls.CustomSashForm in project dbeaver by serge-rider.

the class ErrorPresentation method createPresentation.

@Override
public void createPresentation(@NotNull IResultSetController controller, @NotNull Composite parent) {
    super.createPresentation(controller, parent);
    CustomSashForm partDivider = UIUtils.createPartDivider(controller.getSite().getPart(), parent, SWT.HORIZONTAL);
    partDivider.setLayoutData(new GridData(GridData.FILL_BOTH));
    errorComposite = UIUtils.createComposite(partDivider, 1);
    errorComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
    statusPart = new StatusPart(errorComposite, status);
    for (Control child : errorComposite.getChildren()) {
        if (child instanceof Text) {
            TextEditorUtils.enableHostEditorKeyBindingsSupport(controller.getSite(), child);
        }
    }
    sqlPanel = UIUtils.createComposite(partDivider, 1);
    sqlPanel.setLayout(new FillLayout());
    UIServiceSQL serviceSQL = DBWorkbench.getService(UIServiceSQL.class);
    try {
        editorPanel = serviceSQL.createSQLPanel(controller.getSite(), sqlPanel, controller, "SQL", true, sqlText);
        if (editorPanel instanceof TextViewer) {
            textWidget = ((TextViewer) editorPanel).getTextWidget();
        }
    } catch (DBException e) {
        textWidget = new StyledText(sqlPanel, SWT.BORDER | SWT.READ_ONLY);
        textWidget.setText(sqlText);
    }
    try {
        boolean widthSet = false;
        IDialogSettings viewSettings = ResultSetUtils.getViewerSettings(SETTINGS_SECTION_ERROR_PANEL);
        String errorWidth = viewSettings.get(PROP_ERROR_WIDTH);
        if (errorWidth != null) {
            String[] widthStrs = errorWidth.split(":");
            if (widthStrs.length == 2) {
                partDivider.setWeights(new int[] { Integer.parseInt(widthStrs[0]), Integer.parseInt(widthStrs[1]) });
            }
            widthSet = true;
        }
        if (!widthSet) {
            partDivider.setWeights(new int[] { 700, 300 });
        }
        partDivider.addCustomSashFormListener((firstControlWeight, secondControlWeight) -> {
            int[] weights = partDivider.getWeights();
            viewSettings.put(PROP_ERROR_WIDTH, weights[0] + ":" + weights[1]);
        });
    } catch (Throwable e) {
        log.debug(e);
    }
}
Also used : DBException(org.jkiss.dbeaver.DBException) StyledText(org.eclipse.swt.custom.StyledText) StyledText(org.eclipse.swt.custom.StyledText) Text(org.eclipse.swt.widgets.Text) FillLayout(org.eclipse.swt.layout.FillLayout) TextViewer(org.eclipse.jface.text.TextViewer) Control(org.eclipse.swt.widgets.Control) CustomSashForm(org.jkiss.dbeaver.ui.controls.CustomSashForm) IDialogSettings(org.eclipse.jface.dialogs.IDialogSettings) GridData(org.eclipse.swt.layout.GridData) UIServiceSQL(org.jkiss.dbeaver.runtime.ui.UIServiceSQL) StatusPart(org.eclipse.ui.internal.part.StatusPart)

Example 5 with CustomSashForm

use of org.jkiss.dbeaver.ui.controls.CustomSashForm in project dbeaver by dbeaver.

the class PrefPageProjectNetworkProfiles method createContents.

@Override
protected Control createContents(final Composite parent) {
    CustomSashForm divider = UIUtils.createPartDivider(null, parent, SWT.HORIZONTAL);
    {
        Composite profilesGroup = new Composite(divider, SWT.BORDER);
        GridLayout gl = new GridLayout(1, false);
        gl.marginWidth = 0;
        gl.marginHeight = 0;
        profilesGroup.setLayout(gl);
        GridData gd = new GridData(GridData.FILL_BOTH);
        profilesGroup.setLayoutData(gd);
        {
            ToolBar toolbar = new ToolBar(profilesGroup, SWT.HORIZONTAL | SWT.RIGHT);
            UIUtils.createToolItem(toolbar, "Create", "Create new profile", UIIcon.ROW_ADD, new SelectionAdapter() {

                @Override
                public void widgetSelected(SelectionEvent e) {
                    String profileName = "";
                    while (true) {
                        profileName = EnterNameDialog.chooseName(getShell(), "Profile name", profileName);
                        if (CommonUtils.isEmptyTrimmed(profileName)) {
                            return;
                        }
                        if (projectMeta.getDataSourceRegistry().getNetworkProfile(profileName) != null) {
                            UIUtils.showMessageBox(getShell(), "Wrong profile name", "Profile '" + profileName + "' already exist in project '" + projectMeta.getName() + "'", SWT.ICON_ERROR);
                            continue;
                        }
                        break;
                    }
                    DBWNetworkProfile newProfile = new DBWNetworkProfile();
                    newProfile.setProfileName(profileName);
                    projectMeta.getDataSourceRegistry().updateNetworkProfile(newProfile);
                    projectMeta.getDataSourceRegistry().flushConfig();
                    TableItem item = new TableItem(profilesTable, SWT.NONE);
                    item.setText(newProfile.getProfileName());
                    item.setImage(DBeaverIcons.getImage(DBIcon.TYPE_DOCUMENT));
                    item.setData(newProfile);
                    if (profilesTable.getItemCount() == 1) {
                        selectedProfile = newProfile;
                        profilesTable.select(0);
                        updateControlsState();
                    }
                }
            });
            UIUtils.createToolItem(toolbar, "Delete", "Delete profile", UIIcon.ROW_DELETE, new SelectionAdapter() {

                @Override
                public void widgetSelected(SelectionEvent e) {
                    if (selectedProfile != null) {
                        List<? extends DBPDataSourceContainer> usedBy = projectMeta.getDataSourceRegistry().getDataSourcesByProfile(selectedProfile);
                        if (!usedBy.isEmpty()) {
                            UIUtils.showMessageBox(getShell(), "Can't delete profile", "Configuration profile '" + selectedProfile.getProfileName() + "' used by " + usedBy.size() + " connections:\n" + usedBy, SWT.ICON_ERROR);
                            return;
                        }
                        if (!UIUtils.confirmAction(getShell(), "Delete profile", "Are you sure you want to delete configuration profile '" + selectedProfile.getProfileName() + "'?")) {
                            return;
                        }
                        projectMeta.getDataSourceRegistry().removeNetworkProfile(selectedProfile);
                        projectMeta.getDataSourceRegistry().flushConfig();
                        profilesTable.remove(profilesTable.getSelectionIndex());
                        selectedProfile = null;
                        updateControlsState();
                    } else {
                        UIUtils.showMessageBox(getShell(), "No profile", "Select profile first", SWT.ICON_ERROR);
                    }
                }
            });
        }
        profilesTable = new Table(profilesGroup, SWT.SINGLE);
        gd = new GridData(GridData.FILL_BOTH);
        gd.minimumWidth = 150;
        profilesTable.setLayoutData(gd);
        profilesTable.addSelectionListener(new SelectionAdapter() {

            @Override
            public void widgetSelected(SelectionEvent e) {
                saveHandlerSettings();
                TableItem[] selection = profilesTable.getSelection();
                if (ArrayUtils.isEmpty(selection)) {
                    selectedProfile = null;
                } else {
                    selectedProfile = (DBWNetworkProfile) selection[0].getData();
                }
                updateControlsState();
            }
        });
    }
    {
        handlersFolder = new TabFolder(divider, SWT.TOP | SWT.FLAT);
        handlersFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
        for (NetworkHandlerDescriptor nhd : NetworkHandlerRegistry.getInstance().getDescriptors()) {
            if (!nhd.hasObjectTypes()) {
                createHandlerTab(nhd);
            }
        }
        handlersFolder.addSelectionListener(new SelectionAdapter() {

            @Override
            public void widgetSelected(SelectionEvent e) {
                updateControlsState();
            }
        });
    }
    divider.setWeights(new int[] { 300, 700 });
    performDefaults();
    return divider;
}
Also used : DBWNetworkProfile(org.jkiss.dbeaver.model.net.DBWNetworkProfile) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) NetworkHandlerDescriptor(org.jkiss.dbeaver.registry.network.NetworkHandlerDescriptor) GridLayout(org.eclipse.swt.layout.GridLayout) CustomSashForm(org.jkiss.dbeaver.ui.controls.CustomSashForm) GridData(org.eclipse.swt.layout.GridData) SelectionEvent(org.eclipse.swt.events.SelectionEvent) List(java.util.List) DBPDataSourceContainer(org.jkiss.dbeaver.model.DBPDataSourceContainer)

Aggregations

GridData (org.eclipse.swt.layout.GridData)8 CustomSashForm (org.jkiss.dbeaver.ui.controls.CustomSashForm)8 List (java.util.List)6 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)6 SelectionEvent (org.eclipse.swt.events.SelectionEvent)6 DBException (org.jkiss.dbeaver.DBException)6 java.util (java.util)4 IStatus (org.eclipse.core.runtime.IStatus)4 Status (org.eclipse.core.runtime.Status)4 SWT (org.eclipse.swt.SWT)4 SashForm (org.eclipse.swt.custom.SashForm)4 org.eclipse.swt.widgets (org.eclipse.swt.widgets)4 DBIcon (org.jkiss.dbeaver.model.DBIcon)4 DBUtils (org.jkiss.dbeaver.model.DBUtils)4 AbstractJob (org.jkiss.dbeaver.model.runtime.AbstractJob)4 DBRProgressMonitor (org.jkiss.dbeaver.model.runtime.DBRProgressMonitor)4 DBWorkbench (org.jkiss.dbeaver.runtime.DBWorkbench)4 DBeaverIcons (org.jkiss.dbeaver.ui.DBeaverIcons)4 UIUtils (org.jkiss.dbeaver.ui.UIUtils)4 CommonUtils (org.jkiss.utils.CommonUtils)4