提交 6d583ecc 编写于 作者: E Evgeny Fradkin

#1599 Mock Data. Reset button is added to the generator properties panel.

上级 128fd0f9
......@@ -214,7 +214,7 @@ public class MockDataWizardPageSettings extends ActiveWizardPage<MockDataExecute
Composite placeholder = UIUtils.createPlaceholder(generatorsGroup, 1);
placeholder.setLayoutData(new GridData(GridData.FILL_BOTH));
Composite labelCombo = UIUtils.createPlaceholder(placeholder, 3);
Composite labelCombo = UIUtils.createPlaceholder(placeholder, 4);
gd = new GridData(GridData.FILL_HORIZONTAL);
labelCombo.setLayoutData(gd);
......@@ -238,6 +238,18 @@ public class MockDataWizardPageSettings extends ActiveWizardPage<MockDataExecute
gd.horizontalIndent = 5;
generatorDescriptionLabel.setLayoutData(gd);
Button createButton = new Button(labelCombo, SWT.PUSH);
createButton.setText("Reset");
createButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
for (Object key : propertySource.getProperties().keySet()) {
propertySource.resetPropertyValueToDefault(key);
}
propsEditor.loadProperties(propertySource);
}
});
propsEditor = new PropertyTreeViewer(placeholder, SWT.BORDER);
gd = new GridData(GridData.FILL_BOTH);
gd.verticalIndent = 5;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册