use of org.eclipse.reddeer.swt.impl.button.OkButton in project linuxtools by eclipse.
the class RunDockerImageLaunchConfiguration method addDataVolumeToContainer.
public void addDataVolumeToContainer(String containerPath, String containerName) {
selectTab(VOLUMES_TAB_LABEL);
new PushButton("Add...").click();
new LabeledText("Container path:").setText(containerPath);
new RadioButton("Mount a data volume container").click();
new DefaultCombo("Container").setText(containerName);
new OkButton().click();
}
use of org.eclipse.reddeer.swt.impl.button.OkButton in project linuxtools by eclipse.
the class RunDockerImageLaunchConfiguration method editLink.
public void editLink(String oldContainer, String newContainer, String newAlias) {
selectTab(LINKS_TAB_LABEL);
if (selectItemInTable(oldContainer)) {
new PushButton("Edit...").click();
new WaitWhile(new ShellIsAvailable("Container Linking"));
new LabeledText("Container:").setText(newContainer);
new LabeledText("Value:").setText(newAlias);
new OkButton().click();
} else {
throw new EclipseLayerException("There is no " + oldContainer + " in table on tab " + LINKS_TAB_LABEL);
}
}
use of org.eclipse.reddeer.swt.impl.button.OkButton in project linuxtools by eclipse.
the class RunDockerImageLaunchConfiguration method addValueInTable.
private void addValueInTable(String tabName, String shellName, String newValueName, String newValue) {
selectTab(tabName);
new PushButton("Add...").click();
new WaitUntil(new ShellIsAvailable(shellName));
new LabeledText("Name:").setText(newValueName);
new LabeledText("Value:").setText(newValue);
new OkButton().click();
}
use of org.eclipse.reddeer.swt.impl.button.OkButton in project jbosstools-hibernate by jbosstools.
the class ProjectConfigurationFactory method addFurtherJPAConfiguration.
private static void addFurtherJPAConfiguration(String jpaVersion, boolean addedJavaFacet) {
DefaultHyperlink hyperlink = new DefaultHyperlink();
hyperlink.activate();
Shell s = new DefaultShell("Modify Faceted Project");
if (addedJavaFacet) {
new NextButton().click();
}
DefaultGroup group = new DefaultGroup("Platform");
new DefaultCombo(group).setSelection("Hibernate (JPA " + jpaVersion + ")");
new LabeledCombo("Type:").setSelection("Disable Library Configuration");
new OkButton().click();
new WaitWhile(new ShellIsAvailable(s));
}
use of org.eclipse.reddeer.swt.impl.button.OkButton in project jbosstools-hibernate by jbosstools.
the class ProjectConfigurationFactory method setProjectFacetForDB.
/**
* Sets JPA project facets for given database configuration
* @param prj given project
* @param cfg given database configuration
* @param jpaVersion JPA version (2.0 or 2.1 is supported)
*/
public static void setProjectFacetForDB(String prj, DatabaseConfiguration cfg, String jpaVersion) {
ProjectExplorer pe = new ProjectExplorer();
pe.open();
PropertyDialog pd = pe.getProject(prj).openProperties();
boolean javaFacet = false;
FacetsPropertyPage pp = new FacetsPropertyPage(pd);
pd.select(pp);
for (TreeItem t : getFacets(pd.getShell())) {
if (t.getText().equals("Java")) {
javaFacet = true;
break;
}
}
if (!javaFacet) {
pp.selectFacet("Java");
DefaultHyperlink hyperlink = new DefaultHyperlink();
hyperlink.activate();
Shell s = new DefaultShell("Modify Faceted Project");
new OkButton().click();
new WaitWhile(new ShellIsAvailable(s));
}
pp.selectFacet("JPA");
pp.selectVersion("JPA", jpaVersion);
addFurtherJPAConfiguration(jpaVersion, !javaFacet);
closePreferences(pd);
new WorkbenchShell().setFocus();
pe.open();
pe.selectProjects(prj);
pd.open();
// TODO Why this takes so long ?
pd.select("JPA");
JpaFacetInstallPage jpaPage = new JpaFacetInstallPage(pd);
jpaPage.setConnectionProfile(cfg.getProfileName());
jpaPage.setAutoDiscovery(true);
closePreferences(pd);
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
checkPersistenceXML(prj);
}
Aggregations