Search in sources :

Example 1 with TextWithOpenFolder

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

the class OracleConnectionPage method createTNSConnectionControls.

private void createTNSConnectionControls(TabFolder protocolFolder) {
    TabItem protocolTabTNS = new TabItem(protocolFolder, SWT.NONE);
    protocolTabTNS.setText(OracleMessages.dialog_connection_tns_tab);
    protocolTabTNS.setData(OracleConstants.ConnectionType.TNS);
    Composite targetContainer = new Composite(protocolFolder, SWT.NONE);
    targetContainer.setLayout(new GridLayout(2, false));
    targetContainer.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    protocolTabTNS.setControl(targetContainer);
    UIUtils.createControlLabel(targetContainer, "Network Alias");
    tnsNameCombo = new Combo(targetContainer, SWT.DROP_DOWN);
    tnsNameCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    tnsNameCombo.addModifyListener(controlModifyListener);
    UIUtils.createControlLabel(targetContainer, "TNS names path");
    tnsPathText = new TextWithOpenFolder(targetContainer, "Oracle TNS names path");
    tnsPathText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    tnsPathText.setToolTipText("Path to TNSNAMES.ora file");
    tnsPathText.getTextControl().addModifyListener(new ModifyListener() {

        @Override
        public void modifyText(ModifyEvent e) {
            populateTnsNameCombo();
            updateUI();
        }
    });
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) GridData(org.eclipse.swt.layout.GridData) TextWithOpenFolder(org.jkiss.dbeaver.ui.controls.TextWithOpenFolder)

Aggregations

GridData (org.eclipse.swt.layout.GridData)1 GridLayout (org.eclipse.swt.layout.GridLayout)1 TextWithOpenFolder (org.jkiss.dbeaver.ui.controls.TextWithOpenFolder)1