use of org.jkiss.dbeaver.tools.compare.simple.CompareObjectsSettings in project dbeaver by serge-rider.
the class CompareObjectsPageSettings method createControl.
@Override
public void createControl(Composite parent) {
initializeDialogUnits(parent);
Composite composite = new Composite(parent, SWT.NULL);
GridLayout gl = new GridLayout();
gl.marginHeight = 0;
gl.marginWidth = 0;
composite.setLayout(gl);
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
final CompareObjectsSettings settings = getWizard().getSettings();
{
Group sourceSettings = new Group(composite, SWT.NONE);
sourceSettings.setText("Objects");
gl = new GridLayout(1, false);
sourceSettings.setLayout(gl);
sourceSettings.setLayoutData(new GridData(GridData.FILL_BOTH));
nodesTable = new Table(sourceSettings, SWT.SINGLE | SWT.FULL_SELECTION | SWT.BORDER);
nodesTable.setLayoutData(new GridData(GridData.FILL_BOTH));
nodesTable.setHeaderVisible(true);
UIUtils.createTableColumn(nodesTable, SWT.LEFT, "Name");
UIUtils.createTableColumn(nodesTable, SWT.LEFT, "Type");
UIUtils.createTableColumn(nodesTable, SWT.LEFT, "Full qualified name");
for (DBNDatabaseNode node : settings.getNodes()) {
TableItem item = new TableItem(nodesTable, SWT.NONE);
item.setImage(DBeaverIcons.getImage(node.getNodeIconDefault()));
item.setText(0, node.getNodeName());
item.setText(1, node.getNodeType());
item.setText(2, node.getNodeFullName());
}
}
{
Group compareSettings = new Group(composite, SWT.NONE);
compareSettings.setText("Compare settings");
compareSettings.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
compareSettings.setLayout(new GridLayout(1, false));
skipSystemObjects = UIUtils.createCheckbox(compareSettings, "Skip system objects", settings.isSkipSystemObjects());
skipSystemObjects.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
settings.setSkipSystemObjects(skipSystemObjects.getSelection());
}
});
compareLazyProperties = UIUtils.createCheckbox(compareSettings, "Compare expensive properties", settings.isCompareLazyProperties());
compareLazyProperties.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
settings.setCompareLazyProperties(compareLazyProperties.getSelection());
}
});
compareOnlyStructure = UIUtils.createCheckbox(compareSettings, "Compare only structure (ignore properties)", settings.isCompareOnlyStructure());
compareOnlyStructure.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
settings.setCompareOnlyStructure(compareOnlyStructure.getSelection());
}
});
compareScriptProperties = UIUtils.createCheckbox(compareSettings, "Compare scripts/procedures", settings.isCompareScripts());
compareScriptProperties.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
settings.setCompareScripts(compareScriptProperties.getSelection());
}
});
}
setControl(composite);
}
use of org.jkiss.dbeaver.tools.compare.simple.CompareObjectsSettings in project dbeaver by serge-rider.
the class CompareObjectsPageOutput method createControl.
@Override
public void createControl(Composite parent) {
initializeDialogUnits(parent);
Composite composite = new Composite(parent, SWT.NULL);
GridLayout gl = new GridLayout();
gl.marginHeight = 0;
gl.marginWidth = 0;
composite.setLayout(gl);
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
final CompareObjectsSettings settings = getWizard().getSettings();
{
Group reportSettings = new Group(composite, SWT.NONE);
reportSettings.setText("Report settings");
gl = new GridLayout(1, false);
reportSettings.setLayout(gl);
reportSettings.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
showOnlyDifference = UIUtils.createCheckbox(reportSettings, "Show only differences", settings.isShowOnlyDifferences());
showOnlyDifference.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
settings.setShowOnlyDifferences(showOnlyDifference.getSelection());
}
});
}
{
Group outputSettings = new Group(composite, SWT.NONE);
outputSettings.setText("Output");
gl = new GridLayout(2, false);
outputSettings.setLayout(gl);
outputSettings.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
UIUtils.createControlLabel(outputSettings, "Output type");
reportTypeCombo = new Combo(outputSettings, SWT.DROP_DOWN | SWT.READ_ONLY);
for (CompareObjectsSettings.OutputType outputType : CompareObjectsSettings.OutputType.values()) {
reportTypeCombo.add(outputType.getTitle());
}
reportTypeCombo.select(settings.getOutputType().ordinal());
reportTypeCombo.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
for (CompareObjectsSettings.OutputType outputType : CompareObjectsSettings.OutputType.values()) {
if (outputType.ordinal() == reportTypeCombo.getSelectionIndex()) {
settings.setOutputType(outputType);
UIUtils.enableWithChildren(outputFolderText.getParent(), outputType == CompareObjectsSettings.OutputType.FILE);
break;
}
}
}
});
outputFolderText = DialogUtils.createOutputFolderChooser(outputSettings, null, null);
outputFolderText.setText(settings.getOutputFolder());
UIUtils.enableWithChildren(outputFolderText.getParent(), settings.getOutputType() == CompareObjectsSettings.OutputType.FILE);
outputFolderText.addModifyListener(new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
settings.setOutputFolder(outputFolderText.getText());
}
});
}
setControl(composite);
}
use of org.jkiss.dbeaver.tools.compare.simple.CompareObjectsSettings in project dbeaver by dbeaver.
the class CompareObjectsPageOutput method createControl.
@Override
public void createControl(Composite parent) {
initializeDialogUnits(parent);
Composite composite = new Composite(parent, SWT.NULL);
GridLayout gl = new GridLayout();
gl.marginHeight = 0;
gl.marginWidth = 0;
composite.setLayout(gl);
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
final CompareObjectsSettings settings = getWizard().getSettings();
{
Group reportSettings = new Group(composite, SWT.NONE);
reportSettings.setText("Report settings");
gl = new GridLayout(1, false);
reportSettings.setLayout(gl);
reportSettings.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
showOnlyDifference = UIUtils.createCheckbox(reportSettings, "Show only differences", settings.isShowOnlyDifferences());
showOnlyDifference.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
settings.setShowOnlyDifferences(showOnlyDifference.getSelection());
}
});
}
{
Group outputSettings = new Group(composite, SWT.NONE);
outputSettings.setText("Output");
gl = new GridLayout(2, false);
outputSettings.setLayout(gl);
outputSettings.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
UIUtils.createControlLabel(outputSettings, "Output type");
reportTypeCombo = new Combo(outputSettings, SWT.DROP_DOWN | SWT.READ_ONLY);
for (CompareObjectsSettings.OutputType outputType : CompareObjectsSettings.OutputType.values()) {
reportTypeCombo.add(outputType.getTitle());
}
reportTypeCombo.select(settings.getOutputType().ordinal());
reportTypeCombo.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
for (CompareObjectsSettings.OutputType outputType : CompareObjectsSettings.OutputType.values()) {
if (outputType.ordinal() == reportTypeCombo.getSelectionIndex()) {
settings.setOutputType(outputType);
UIUtils.enableWithChildren(outputFolderText.getParent(), outputType == CompareObjectsSettings.OutputType.FILE);
break;
}
}
}
});
outputFolderText = DialogUtils.createOutputFolderChooser(outputSettings, null, null);
outputFolderText.setText(settings.getOutputFolder());
UIUtils.enableWithChildren(outputFolderText.getParent(), settings.getOutputType() == CompareObjectsSettings.OutputType.FILE);
outputFolderText.addModifyListener(new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
settings.setOutputFolder(outputFolderText.getText());
}
});
}
setControl(composite);
}
use of org.jkiss.dbeaver.tools.compare.simple.CompareObjectsSettings in project dbeaver by dbeaver.
the class CompareObjectsPageSettings method createControl.
@Override
public void createControl(Composite parent) {
initializeDialogUnits(parent);
Composite composite = new Composite(parent, SWT.NULL);
GridLayout gl = new GridLayout();
gl.marginHeight = 0;
gl.marginWidth = 0;
composite.setLayout(gl);
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
final CompareObjectsSettings settings = getWizard().getSettings();
{
Group sourceSettings = new Group(composite, SWT.NONE);
sourceSettings.setText("Objects");
gl = new GridLayout(1, false);
sourceSettings.setLayout(gl);
sourceSettings.setLayoutData(new GridData(GridData.FILL_BOTH));
nodesTable = new Table(sourceSettings, SWT.SINGLE | SWT.FULL_SELECTION | SWT.BORDER);
nodesTable.setLayoutData(new GridData(GridData.FILL_BOTH));
nodesTable.setHeaderVisible(true);
UIUtils.createTableColumn(nodesTable, SWT.LEFT, "Name");
UIUtils.createTableColumn(nodesTable, SWT.LEFT, "Type");
UIUtils.createTableColumn(nodesTable, SWT.LEFT, "Full qualified name");
for (DBNDatabaseNode node : settings.getNodes()) {
TableItem item = new TableItem(nodesTable, SWT.NONE);
item.setImage(DBeaverIcons.getImage(node.getNodeIconDefault()));
item.setText(0, node.getNodeName());
item.setText(1, node.getNodeType());
item.setText(2, node.getNodeFullName());
}
}
{
Group compareSettings = new Group(composite, SWT.NONE);
compareSettings.setText("Compare settings");
compareSettings.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
compareSettings.setLayout(new GridLayout(1, false));
skipSystemObjects = UIUtils.createCheckbox(compareSettings, "Skip system objects", settings.isSkipSystemObjects());
skipSystemObjects.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
settings.setSkipSystemObjects(skipSystemObjects.getSelection());
}
});
compareLazyProperties = UIUtils.createCheckbox(compareSettings, "Compare expensive properties", settings.isCompareLazyProperties());
compareLazyProperties.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
settings.setCompareLazyProperties(compareLazyProperties.getSelection());
}
});
compareOnlyStructure = UIUtils.createCheckbox(compareSettings, "Compare only structure (ignore properties)", settings.isCompareOnlyStructure());
compareOnlyStructure.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
settings.setCompareOnlyStructure(compareOnlyStructure.getSelection());
}
});
compareScriptProperties = UIUtils.createCheckbox(compareSettings, "Compare scripts/procedures", settings.isCompareScripts());
compareScriptProperties.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
settings.setCompareScripts(compareScriptProperties.getSelection());
}
});
}
setControl(composite);
}
Aggregations