List of usage examples for org.eclipse.jface.dialogs IDialogConstants FINISH_LABEL
String FINISH_LABEL
To view the source code for org.eclipse.jface.dialogs IDialogConstants FINISH_LABEL.
Click Source Link
From source file:org.bonitasoft.studio.tests.timer.TestTimer.java
License:Open Source License
/**Set properties on a Fixed Date Timer . * // w w w . j a v a 2 s. co m * @throws InterruptedException * @throws ParseException */ public void testEditVariableConstantTimerCondition() throws Exception { SWTBotGefEditor gmfEditor = addTimerAndTaskToDiagram(); // Set Timer1 editTimerCondition(gmfEditor, DEFAULT_TIMER_NAME); bot.toolbarButtonWithId(ExpressionViewer.SWTBOT_ID_EDITBUTTON, 0).click(); // wait for "Edit Expression" shell bot.waitUntil(Conditions.shellIsActive(editExpressionShellLabel)); bot.table().select("Constant"); Matcher<Widget> matcher = WidgetMatcherFactory.withLabel("Value"); bot.waitUntil(Conditions.waitForWidget(matcher)); bot.textWithLabel("Value").setText("120000"); Assert.assertEquals("Error: Wrong Timer Condition setted", "120000", bot.textWithLabel("Value").getText()); // "Return type" , "java.lang.Long" SWTBotCombo returnTypeCombo = bot.comboBoxWithLabel(org.bonitasoft.studio.groovy.ui.Messages.returnType); returnTypeCombo.setSelection(Long.class.getName()); Assert.assertEquals("Error: Wrong Timer Condition return type setted", Long.class.getName(), returnTypeCombo.getText()); // in the shell editor for 'Every hour' bot.button(IDialogConstants.OK_LABEL).click(); Assert.assertEquals("Error: Content of text field is not corrected.", "120000", bot.text().getText()); bot.button(IDialogConstants.FINISH_LABEL).click(); Assert.assertEquals("Error: Wrong Timer Condition", "00:02:00", bot.textWithLabel(Messages.timerCondition).getText()); editTimerCondition(gmfEditor, DEFAULT_TIMER_NAME); Assert.assertTrue("Error: Wrong Timer Condition", bot.radio(Messages.durationLabel).isSelected()); bot.button(IDialogConstants.CANCEL_LABEL).click(); bot.menu("Diagram").menu("Save").click(); IStatus status = SWTBotTestUtil.selectAndRunFirstPoolFound(bot); assertTrue(status.getMessage(), status.isOK()); }
From source file:org.bonitasoft.studio.validators.test.swtbot.TestCreateValidatorWizard.java
License:Open Source License
/** * @throws JavaModelException/*from w w w. ja va 2s . c o m*/ * @throws InterruptedException * @throws OperationCanceledException */ @Test public void testCreateValidatorOnField() throws JavaModelException, OperationCanceledException, InterruptedException { openNewValidatorWizardDialog(); SWTBotShell newShell = bot.activeShell(); SWTBot dialogBot = newShell.bot(); String displayName = "cool displayNameTest"; String className = "MyValidatorTestClassName1"; String packageName = "org.boni.testme"; dialogBot.textWithLabel("Display name *").setText(displayName); assertFalse(dialogBot.button(IDialogConstants.FINISH_LABEL).isEnabled()); dialogBot.textWithLabel("Class *").setText(className); assertFalse(dialogBot.button(IDialogConstants.FINISH_LABEL).isEnabled()); dialogBot.textWithLabel(Messages.createValidatorWizardPage_packageLabel + " *").setText(packageName); dialogBot.comboBox().setSelection("Field"); dialogBot.button(IDialogConstants.FINISH_LABEL).click(); // bot.waitUntil(Conditions.shellCloses(newShell), 10000); Matcher<IEditorReference> matcher = WidgetMatcherFactory.withPartName(className + ".java"); bot.waitUntil(Conditions.waitForEditor(matcher)); check(packageName, className, displayName, "IFormFieldValidator"); }
From source file:org.bonitasoft.studio.validators.test.swtbot.TestCreateValidatorWizard.java
License:Open Source License
/** * @throws JavaModelException/*from www .j ava 2 s . c o m*/ * @throws InterruptedException * @throws OperationCanceledException */ @Test public void testCreateValidatorOnForm() throws JavaModelException, OperationCanceledException, InterruptedException { openNewValidatorWizardDialog(); SWTBotShell newShell = bot.activeShell(); SWTBot dialogBot = newShell.bot(); String className = "MyValidatorTestClassName2"; String packageName = "org.boni.testme"; String displayName = "cool displayNameTest2"; dialogBot.textWithLabel("Display name *").setText(displayName); assertFalse(dialogBot.button(IDialogConstants.FINISH_LABEL).isEnabled()); dialogBot.textWithLabel("Class *").setText(className); assertFalse(dialogBot.button(IDialogConstants.FINISH_LABEL).isEnabled()); dialogBot.textWithLabel(Messages.createValidatorWizardPage_packageLabel + " *").setText(packageName); dialogBot.comboBox().setSelection("Page"); dialogBot.button(IDialogConstants.FINISH_LABEL).click(); Matcher<IEditorReference> matcher = WidgetMatcherFactory.withPartName(className + ".java"); bot.waitUntil(Conditions.waitForEditor(matcher)); // bot.waitUntil(Conditions.shellCloses(newShell), 10000); check(packageName, className, displayName, "IFormPageValidator"); }
From source file:org.eclipse.birt.report.designer.ui.cubebuilder.page.SimpleCubeBuilder.java
License:Open Source License
protected void createButtonsForButtonBar(Composite parent) { super.createButtonsForButtonBar(parent); getButton(IDialogConstants.OK_ID).setText(IDialogConstants.FINISH_LABEL); }
From source file:org.eclipse.edt.ide.rui.visualeditor.internal.util.Mnemonics.java
License:Open Source License
/** * Set if the mnemonics are for a wizard page * Wizard pages already have a few buttons with mnemonics set by Eclipse * We have to make sure we do not use the ones they use *///from w w w. j a v a 2 s. com public Mnemonics setOnWizardPage(boolean page) { if (page) { String[] labels = new String[] { IDialogConstants.BACK_LABEL, IDialogConstants.NEXT_LABEL, IDialogConstants.FINISH_LABEL }; String used = getMnemonicsFromStrings(labels).toUpperCase(); makeUsed(used); } return this; }
From source file:org.eclipse.edt.ide.ui.internal.dialogs.MultiElementListSelectionDialog.java
License:Open Source License
protected void createButtonsForButtonBar(Composite parent) { fBackButton = createButton(parent, IDialogConstants.BACK_ID, IDialogConstants.BACK_LABEL, false); fNextButton = createButton(parent, IDialogConstants.NEXT_ID, IDialogConstants.NEXT_LABEL, true); fFinishButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.FINISH_LABEL, false); createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false); }
From source file:org.eclipse.egit.ui.common.CreatePatchWizard.java
License:Open Source License
public void finish() { shell.bot().button(IDialogConstants.FINISH_LABEL).click(); }
From source file:org.eclipse.egit.ui.common.PushWizardTester.java
License:Open Source License
public void finish() { bot.button(IDialogConstants.FINISH_LABEL).click(); }
From source file:org.eclipse.egit.ui.internal.push.PushBranchWizardTester.java
License:Open Source License
public void selectNewRemoteOnBranchPage(String remoteName, String uri) { wizard.button(UIText.PushBranchPage_NewRemoteButton).click(); SWTBot addRemoteWizard = wizard.shell(UIText.AddRemoteWizard_Title).bot(); setRemoteNameAndUri(remoteName, uri, addRemoteWizard); addRemoteWizard.button(IDialogConstants.FINISH_LABEL).click(); }
From source file:org.eclipse.egit.ui.internal.push.PushBranchWizardTester.java
License:Open Source License
public void finish() { JobJoiner jobJoiner = JobJoiner.startListening(JobFamilies.PUSH, 60, TimeUnit.SECONDS); wizard.button(IDialogConstants.FINISH_LABEL).click(); jobJoiner.join(); }