use of org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog in project jbosstools-hibernate by jbosstools.
the class DriverDefinitionFactory method createDatabaseDriverDefinition.
/**
* Creates Driver definition based on DatabaseRequirement configuration
* @param conf given database requirement configuration
*/
public static void createDatabaseDriverDefinition(DatabaseConfiguration cfg) {
DriverTemplate dt = getDriverTemplate(cfg);
DriverDefinition dd = getDriverDefinition(cfg);
// Driver Definition creation
WorkbenchPreferenceDialog preferenceDialog = new WorkbenchPreferenceDialog();
preferenceDialog.open();
DriverPreferences preferencePage = new DriverPreferences(preferenceDialog);
preferenceDialog.select(preferencePage);
// TODO implement this in preference page
// TODO dont create new driver def if it already exists
List<TableItem> items = new DefaultTable().getItems();
for (int i = 0; i < items.size(); i++) {
new DefaultTableItem(0).select();
new PushButton("Remove").click();
Shell confirm = new DefaultShell("Confirm Driver Removal");
new YesButton().click();
new WaitWhile(new ShellIsAvailable(confirm));
new DefaultShell("Preferences");
}
DriverDialog ddw = preferencePage.addDriverDefinition();
ddw.selectDriverTemplate(dt.getType(), dt.getVersion());
ddw.setName(cfg.getDriverName());
ddw.addDriverLibrary(dd.getDriverLibrary());
ddw.setDriverClass(cfg.getDriverClass());
ddw.ok();
preferenceDialog.ok();
}
use of org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog in project jbosstools-openshift by jbosstools.
the class StoreConnectionTest method cleanUp.
@AfterClass
public static void cleanUp() {
WorkbenchPreferenceDialog preferences = new WorkbenchPreferenceDialog();
preferences.open();
StoragePreferencePage storagePreferencePage = new StoragePreferencePage(preferences);
preferences.select(storagePreferencePage);
storagePreferencePage.selectPasswordsTab();
List<PasswordProvider> masterPasswordProviders = storagePreferencePage.getMasterPasswordProviders();
for (PasswordProvider tableItem : masterPasswordProviders) {
tableItem.setEnabled(true);
}
preferences.ok();
}
use of org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog in project jbosstools-openshift by jbosstools.
the class StoreConnectionTest method setupClass.
@BeforeClass
public static void setupClass() {
WorkbenchPreferenceDialog preferences = new WorkbenchPreferenceDialog();
preferences.open();
StoragePreferencePage storagePreferencePage = new StoragePreferencePage(preferences);
preferences.select(storagePreferencePage);
storagePreferencePage.selectPasswordsTab();
List<PasswordProvider> masterPasswordProviders = storagePreferencePage.getMasterPasswordProviders();
for (PasswordProvider tableItem : masterPasswordProviders) {
// The second part of this if is because https://issues.jboss.org/browse/JBIDE-24567
if (tableItem.getDescription().contains("UI Prompt") || tableItem.getDescription().contains("secureStorageProvider.name")) {
tableItem.setEnabled(true);
} else {
tableItem.setEnabled(false);
}
}
preferences.ok();
}
use of org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog in project jbosstools-openshift by jbosstools.
the class OCBinaryLocationTest method openDialogAndSelectPage.
@Before
public void openDialogAndSelectPage() {
dialog = new WorkbenchPreferenceDialog();
page = new OpenShift3PreferencePage(dialog);
dialog.open();
dialog.select(page);
}
use of org.eclipse.reddeer.workbench.ui.dialogs.WorkbenchPreferenceDialog in project jbosstools-openshift by jbosstools.
the class DebuggingEAPAppTest method doNotSuspendOnUncaughtExceptions.
private static void doNotSuspendOnUncaughtExceptions() {
WorkbenchPreferenceDialog workbenchPreferenceDialog = new WorkbenchPreferenceDialog();
workbenchPreferenceDialog.open();
JavaDebugPreferencePage javaDebugPreferencePage = new JavaDebugPreferencePage(workbenchPreferenceDialog);
workbenchPreferenceDialog.select(javaDebugPreferencePage);
javaDebugPreferencePage.setSuspendOnUncaughtExceptions(false);
workbenchPreferenceDialog.ok();
}
Aggregations