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.actors.tests.SWTbot.ActorFilterImplementationTest.java
License:Open Source License
@Test public void testPackageSyntax() throws Exception { final String id = "testImplementation"; final String definition = "testEdit"; final String className = "MyactorFilterImpl"; final String packageName = "org.bonita.actorFilter."; SWTBotActorFilterUtil.activateActorFilterImplementationShell(bot); selectDefinition(definition);//from ww w . j a v a 2s . c o m bot.textWithLabel("Implementation id *").setText(id); bot.textWithLabel("Class name *").setText(className); bot.textWithLabel("Package *").setText(packageName); assertFalse("finish button should be desabled", bot.button(IDialogConstants.FINISH_LABEL).isEnabled()); bot.button(IDialogConstants.CANCEL_LABEL).click(); }
From source file:org.bonitasoft.studio.actors.tests.SWTbot.ActorFilterImplementationTest.java
License:Open Source License
@Test public void testactorFilterImplementationEdition() { final int nbEditorsBefore = bot.editors().size(); final String id = "testImplementation2"; final String id2 = "textImplementation3"; final String definition = "testEdit"; final String className = "MyactorFilterImpl2"; final String packageName = "org.bonita.actorFilter.test"; SWTBotActorFilterUtil.activateActorFilterImplementationShell(bot); selectDefinition(definition);/*from w w w. jav a2s. com*/ bot.textWithLabel("Implementation id *").setText(id); bot.textWithLabel("Class name *").setText(className); bot.textWithLabel("Package *").setText(packageName); bot.waitUntil(Conditions.widgetIsEnabled(bot.button(IDialogConstants.FINISH_LABEL)), 5000); bot.button(IDialogConstants.FINISH_LABEL).click(); bot.waitUntil(new ICondition() { @Override public boolean test() throws Exception { return nbEditorsBefore + 1 == bot.editors().size(); } @Override public void init(SWTBot bot) { } @Override public String getFailureMessage() { return "Editor for implementation has not been opened."; } }, 30000); SWTBotActorFilterUtil.activateActorFilterImplEditionShell(bot); bot.table().unselect(); bot.waitUntil(new ICondition() { @Override public boolean test() throws Exception { return !bot.button(Messages.Edit).isEnabled(); } @Override public void init(SWTBot bot) { } @Override public String getFailureMessage() { return "Finish button should be disabled"; } }); bot.table().select(id + " (1.0.0) -- " + packageName + "." + className); bot.button(Messages.Edit).click(); selectDefinition(definition); assertEquals("Implementation id should be " + id, bot.textWithLabel("Implementation id *").getText(), id); assertEquals("Version should be 1.0.0", bot.textWithLabel("Version *").getText(), "1.0.0"); assertEquals("Class name should be " + className, bot.textWithLabel("Class name *").getText(), className); assertEquals("Package should be " + packageName, bot.textWithLabel("Package *").getText(), packageName); bot.textWithLabel("Implementation id *").setText(id2); bot.button(IDialogConstants.FINISH_LABEL).click(); ActorFilterImplRepositoryStore store = (ActorFilterImplRepositoryStore) RepositoryManager.getInstance() .getRepositoryStore(ActorFilterImplRepositoryStore.class); ConnectorImplementation actorFilterImpl = store.getImplementation(id, "1.0.0"); assertNull("actorFilterImplementation with id" + id + "should not exist anymore", actorFilterImpl); actorFilterImpl = store.getImplementation(id2, "1.0.0"); assertNotNull("actorFilterImplementation id was not edited correctly", actorFilterImpl); assertEquals("actorFilter id should be " + id2, actorFilterImpl.getImplementationId(), id2); removeImplementation(id2); }
From source file:org.bonitasoft.studio.actors.tests.SWTbot.ActorFilterImplementationTest.java
License:Open Source License
@Test public void testActorFilterImplEditionWithSameDefandClassName() { final int nbEditorsBefore = bot.editors().size(); final String id = "testImplementation4"; final String id2 = "testImplementation5"; final String definition = "testEdit"; final String className = "MyactorFilterImpl"; final String packageName = "org.bonita.actorFilter.test"; SWTBotActorFilterUtil.activateActorFilterImplementationShell(bot); selectDefinition(definition);//from ww w .ja va2s . c om bot.textWithLabel("Implementation id *").setText(id); bot.textWithLabel("Class name *").setText(className); bot.textWithLabel("Package *").setText(packageName); bot.waitUntil(Conditions.widgetIsEnabled(bot.button(IDialogConstants.FINISH_LABEL)), 5000); bot.button(IDialogConstants.FINISH_LABEL).click(); bot.waitUntil(new ICondition() { @Override public boolean test() throws Exception { return nbEditorsBefore + 1 == bot.editors().size(); } @Override public void init(SWTBot bot) { } @Override public String getFailureMessage() { return "Editor for implementation has not been opened."; } }, 30000); SWTBotActorFilterUtil.activateActorFilterImplementationShell(bot); selectDefinition(definition); bot.textWithLabel("Implementation id *").setText(id2); bot.textWithLabel("Class name *").setText(className); bot.textWithLabel("Package *").setText(packageName); bot.waitUntil(new ICondition() { @Override public boolean test() throws Exception { return !bot.button(IDialogConstants.FINISH_LABEL).isEnabled(); } @Override public void init(SWTBot bot) { } @Override public String getFailureMessage() { return "Finish button should be disabled"; } }); bot.button(IDialogConstants.CANCEL_LABEL).click(); removeImplementation(id); }
From source file:org.bonitasoft.studio.actors.tests.SWTbot.SWTBotActorFilterUtil.java
License:Open Source License
/** * use it to create a connector def and impl (no window should be opened) * /* w w w.jav a 2 s . c o m*/ * @param bot * @param id * @param version * @param className * @param packageName */ public static void createActorFilterDefAndImpl(final SWTWorkbenchBot bot, String id, String version, String className, String packageName) { final int nbEditorsBefore = bot.editors().size(); activateActorFilterDefinitionShell(bot); createActorFilterDefinition(bot, id, version); bot.button(IDialogConstants.FINISH_LABEL).click(); activateActorFilterImplementationShell(bot); bot.table().select(id); SWTBotCombo comboBoxToSelectVersion = bot.comboBoxWithLabel("Definition version"); if (comboBoxToSelectVersion.isEnabled()) { comboBoxToSelectVersion.setSelection(version); } bot.button(IDialogConstants.NEXT_LABEL).click(); bot.textWithLabel("Class name *").setText(className); bot.textWithLabel("Package *").setText(packageName); bot.button(IDialogConstants.FINISH_LABEL).click(); bot.waitUntil(new ICondition() { public boolean test() throws Exception { return nbEditorsBefore + 1 == bot.editors().size(); } public void init(SWTBot bot) { } public String getFailureMessage() { return "Editor for implementation has not been opened."; } }, 30000); }
From source file:org.bonitasoft.studio.application.test.wizards.TestOpenProcessWizard.java
License:Open Source License
public void not_close_wizard_when_click_finish_and_no_process_is_selected() throws Throwable { assertThat(bot.button(/*Messages.OpenProcessButtonLabel*/IDialogConstants.FINISH_LABEL).isEnabled(), is(false));/*from w ww. j av a 2 s .co m*/ }
From source file:org.bonitasoft.studio.businessobject.ui.expression.CreateBusinessDataProposalListener.java
License:Open Source License
@Override public String handleEvent(EObject context, final String fixedReturnType) { Assert.isNotNull(context);/*from w ww . java2s .c om*/ while (!(context instanceof Pool)) { context = context.eContainer(); } final BusinessObjectModelRepositoryStore repositoryStore = RepositoryManager.getInstance() .getRepositoryStore(BusinessObjectModelRepositoryStore.class); final AddBusinessObjectDataWizard newWizard = new AddBusinessObjectDataWizard((DataAware) context, newMultipleBusinessData(context), repositoryStore, TransactionUtil.getEditingDomain(context)); Shell activeShell = Display.getDefault().getActiveShell(); if (activeShell.getParent() != null) { activeShell = activeShell.getParent().getShell(); } final CustomWizardDialog wizardDialog = new CustomWizardDialog(activeShell, newWizard, IDialogConstants.FINISH_LABEL); if (wizardDialog.open() == Dialog.OK) { final EObject obj = newWizard.getBusinessObjectData(); if (obj instanceof Data) { final Data d = (Data) obj; if (d != null) { return d.getName(); } } } return null; }
From source file:org.bonitasoft.studio.businessobject.ui.handler.ManageBusinessObjectHandler.java
License:Open Source License
@Override public Object execute(final ExecutionEvent event) throws ExecutionException { final ManageBusinessDataModelWizard newBusinessDataModelWizard = createWizard(); final CustomWizardDialog dialog = createWizardDialog(newBusinessDataModelWizard, IDialogConstants.FINISH_LABEL); return dialog.open() == IDialogConstants.OK_ID; }
From source file:org.bonitasoft.studio.businessobject.ui.handler.ManageBusinessObjectHandlerTest.java
License:Open Source License
/** * @throws java.lang.Exception//from w w w .j a v a 2s. c o m */ @Before public void setUp() throws Exception { Mockito.doReturn(businessStore).when(handlerUnderTest).getStore(); Mockito.doReturn(wizard).when(handlerUnderTest).createWizard(); when(wizardDialog.open()).thenReturn(IDialogConstants.OK_ID); Mockito.doReturn(wizardDialog).when(handlerUnderTest).createWizardDialog(wizard, IDialogConstants.FINISH_LABEL); }
From source file:org.bonitasoft.studio.common.jface.CustomWizardDialog.java
License:Open Source License
public CustomWizardDialog(Shell parentShell, IWizard newWizard) { this(parentShell, newWizard, IDialogConstants.FINISH_LABEL); }
From source file:org.bonitasoft.studio.common.jface.dialog.FinishAndAddCustomWizardDialog.java
License:Open Source License
public void moveFinishButton() { final Button cancelButton = getButton(IDialogConstants.CANCEL_ID); final Button finishButton = getButton(IDialogConstants.FINISH_ID); finishAndNewButton.moveAbove(cancelButton); finishButton.setText(IDialogConstants.FINISH_LABEL); finishButton.moveAbove(finishAndNewButton); }