use of org.eclipse.reddeer.swt.impl.menu.ContextMenuItem in project jbosstools-openshift by jbosstools.
the class ServerAdapter method delete.
/**
* Deletes server adapter safely - if it was not selected, selects it and
* then deletes.
*/
public void delete() {
select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.DELETE).select();
new DefaultShell(OpenShiftLabel.Shell.DELETE_ADAPTER);
new OkButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.DELETE_ADAPTER));
new WaitWhile(new JobIsRunning(), TimePeriod.LONG);
}
use of org.eclipse.reddeer.swt.impl.menu.ContextMenuItem in project jbosstools-openshift by jbosstools.
the class OpenShift3Connection method createNewProject.
/**
* Creates a new OpenShift project for a connection.
*
* @param projectName project name
* @param displayedName displayed name
* @return OpenShift Project
*/
public OpenShiftProject createNewProject(String projectName, String displayedName) {
select();
new ContextMenuItem(OpenShiftLabel.ContextMenu.NEW_OS_PROJECT).select();
new DefaultShell(OpenShiftLabel.Shell.CREATE_OS_PROJECT);
new LabeledText(OpenShiftLabel.TextLabels.PROJECT_NAME).setText(projectName);
if (displayedName != null) {
new LabeledText(OpenShiftLabel.TextLabels.PROJECT_DISPLAYED_NAME).setText(displayedName);
}
new FinishButton().click();
new WaitWhile(new ShellIsAvailable(OpenShiftLabel.Shell.CREATE_OS_PROJECT), TimePeriod.LONG);
if (displayedName == null) {
return getProject(projectName);
} else {
return getProject(displayedName);
}
}
use of org.eclipse.reddeer.swt.impl.menu.ContextMenuItem in project jbosstools-hibernate by jbosstools.
the class HibernateRedDeerTest method deleteHibernateConfigurations.
private static void deleteHibernateConfigurations() {
KnownConfigurationsView v = new KnownConfigurationsView();
v.open();
while (v.getConsoleConfigurations() != null && !v.getConsoleConfigurations().isEmpty()) {
TreeItem i = v.getConsoleConfigurations().get(0);
i.select();
ContextMenuItem closeConfig = new ContextMenuItem("Close Configuration");
if (closeConfig.isEnabled()) {
closeConfig.select();
new WaitWhile(new JobIsRunning());
}
v.deleteConsoleConfiguration(i.getText());
}
}
use of org.eclipse.reddeer.swt.impl.menu.ContextMenuItem in project jbosstools-hibernate by jbosstools.
the class JpaAnnotationGenerationTest method testGenerateJPAHibernateAnnotations.
@Test
public void testGenerateJPAHibernateAnnotations() {
ProjectUtils.getItem(prj, PCKG, "Dog.java").select();
new ContextMenuItem("Source", "Generate Hibernate/JPA annotations...").select();
postCheck("Dog");
ProjectUtils.getItem(prj, PCKG, "Owner.java").select();
new ShellMenuItem("Source", "Generate Hibernate/JPA annotations...").select();
postCheck("Owner");
}
use of org.eclipse.reddeer.swt.impl.menu.ContextMenuItem in project jbosstools-hibernate by jbosstools.
the class MappingDiagramTest method openMappingDiagram.
private void openMappingDiagram() {
KnownConfigurationsView v = new KnownConfigurationsView();
v.open();
v.selectConsole(prj);
ContextMenuItem mappingMenu = new ContextMenuItem("Mapping Diagram");
mappingMenu.select();
}
Aggregations