Example usage for org.eclipse.jface.dialogs IDialogConstants NEXT_LABEL

List of usage examples for org.eclipse.jface.dialogs IDialogConstants NEXT_LABEL

Introduction

In this page you can find the example usage for org.eclipse.jface.dialogs IDialogConstants NEXT_LABEL.

Prototype

String NEXT_LABEL

To view the source code for org.eclipse.jface.dialogs IDialogConstants NEXT_LABEL.

Click Source Link

Document

The label for next buttons.

Usage

From source file:org.bonitasoft.studio.actors.tests.SWTbot.ActorFilterDefinitionWizardPageTest.java

License:Open Source License

private void openActorFilterDefinitionWizardPage(String id) {
    final String packageLang = "java.lang.";
    final String packageUtil = "java.util.";
    SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
    Keyboard key = KeyboardFactory.getSWTKeyboard();
    SWTBotActorFilterUtil.activateActorFilterDefinitionShell(bot);
    SWTBotActorFilterUtil.createActorFilterDefinition(bot, id, "1.0.0");
    bot.waitUntil(Conditions.widgetIsEnabled(bot.button(IDialogConstants.NEXT_LABEL)), 5000);
    bot.button(IDialogConstants.NEXT_LABEL).click();
    SWTBotTable table = bot.table();//  w  w w  .  ja  v a2 s .c o  m
    bot.button("Add...").click();
    bot.button("Add...").click();
    bot.button("Add...").click();
    bot.button("Add...").click();
    table.click(1, 2);
    bot.ccomboBox().setSelection(packageLang + "Boolean");
    key.pressShortcut(Keystrokes.CR);
    bot.button("Add...").click();
    table.click(2, 2);
    bot.ccomboBox().setSelection(packageLang + "Double");
    key.pressShortcut(Keystrokes.CR);
    bot.button("Add...").click();
    table.click(3, 2);
    bot.ccomboBox().setSelection(packageLang + "Float");
    key.pressShortcut(Keystrokes.CR);
    bot.button("Add...").click();
    table.click(4, 2);
    bot.ccomboBox().setSelection(packageLang + "Integer");
    key.pressShortcut(Keystrokes.CR);
    bot.button("Add...").click();
    table.click(5, 2);
    bot.ccomboBox().setSelection(packageUtil + "List");
    key.pressShortcut(Keystrokes.CR);
    bot.button("Add...").click();
    table.click(6, 2);
    bot.ccomboBox().setSelection(packageUtil + "Map");
    key.pressShortcut(Keystrokes.CR);
    bot.button(IDialogConstants.NEXT_LABEL).click();

}

From source file:org.bonitasoft.studio.actors.tests.SWTbot.ActorFilterImplementationTest.java

License:Open Source License

protected void selectDefinition(final String definition) {
    bot.treeWithId(SWTBOT_ID_EXPLORER_LEFT_TREE).select(0);
    bot.waitUntil(new ICondition() {

        public boolean test() throws Exception {
            return bot.tableWithId(SWTBOT_ID_EXPLORER_RIGHT_TABLE).rowCount() > 0;
        }//from  ww w .  j  a  va  2s  . com

        public void init(SWTBot bot) {
        }

        public String getFailureMessage() {
            return "No items found in right table of connector explorer";
        }
    });
    bot.tableWithId(SWTBOT_ID_EXPLORER_RIGHT_TABLE).select(definition);
    bot.button(IDialogConstants.NEXT_LABEL).click();
}

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)
 * /*from ww  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.connectors.test.database.TestDatabaseConnectorOutputMode.java

License:Open Source License

@Test
public void testPatternExpressionViewer() {
    SWTBotTestUtil.createNewDiagram(bot);
    bot.viewById(SWTBotTestUtil.VIEWS_PROPERTIES_PROCESS_GENERAL).show();
    SWTBotTestUtil.selectTabbedPropertyView(bot, "Data");
    bot.button(Messages.Add).click();//from ww  w  .java  2 s . com
    SWTBotTestUtil.addNewData(bot, DATA_NAME_1, "Text", false, null);
    String connectorLabel = getConnectorLabel(JDBC_DB_CONNECTOR_ID);
    String connectorVersion = getConnectorVersion(JDBC_DB_CONNECTOR_ID);
    String[] dbCategoryLabel = getCategoryLabels(new String[] { DB_CATEGORY_ID, GENERIC_DB_CATEGORY_ID });
    addDBConnectorWithPatternExpression(connectorLabel, connectorVersion, dbCategoryLabel,
            "patternDBConnector");
    bot.styledText().setText(QUERY1);
    bot.button(IDialogConstants.NEXT_LABEL).click();

    checkEnalbledChoices();
}

From source file:org.bonitasoft.studio.connectors.test.database.TestDatabaseConnectorOutputMode.java

License:Open Source License

private void addDBConnectorWithPatternExpression(String connectorLabel, String connectorVersion,
        String[] dbCategoryLabel, String connectorName) {
    //SWTBotConnectorTestUtil.addConnectorToPool(bot, connectorLabel,connectorVersion,dbCategoryLabel, connectorName);
    SWTBotTestUtil.selectTabbedPropertyView(bot, "Connectors");
    bot.button("Add...").click();
    bot.text().setText(connectorLabel);//w w w  . ja v a 2  s .c o m
    bot.table().select(0);
    bot.button(IDialogConstants.NEXT_LABEL).click();
    bot.textWithLabel("Name *").setText(connectorName);
    bot.waitUntil(Conditions.widgetIsEnabled(bot.button(IDialogConstants.NEXT_LABEL)), 5000);
    bot.button(IDialogConstants.NEXT_LABEL).click();
    bot.button(IDialogConstants.NEXT_LABEL).click();
    bot.button(IDialogConstants.NEXT_LABEL).click();
}

From source file:org.bonitasoft.studio.connectors.test.database.TestDatabaseConnectorOutputMode.java

License:Open Source License

private void checkEnalbledChoices() {
    assertFalse(//from www  .  j  a  v a  2  s.  c  o  m
            bot.checkBox(org.bonitasoft.studio.connectors.i18n.Messages.alwaysUseScriptingMode).isEnabled());
    assertTrue(bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.graphicalMode).isEnabled());
    assertTrue(bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.scriptMode).isEnabled());
    assertTrue(bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.singleValue).isEnabled());
    assertTrue(bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.oneRowNCol).isEnabled());
    assertTrue(bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.nRowOneCol).isEnabled());
    assertTrue(bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.nRowsNcolumns).isSelected());

    bot.button(IDialogConstants.NEXT_LABEL).click();
    assertEquals("tableResult",
            bot.textWithLabel(org.bonitasoft.studio.connectors.i18n.Messages.takeValueOf).getText());
    bot.button(IDialogConstants.BACK_LABEL).click();

    bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.singleValue).click();
    bot.button(IDialogConstants.NEXT_LABEL).click();
    assertEquals("col1",
            bot.textWithLabel(org.bonitasoft.studio.connectors.i18n.Messages.takeValueOf).getText());
    bot.button(IDialogConstants.BACK_LABEL).click();

    bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.oneRowNCol).click();
    bot.button(IDialogConstants.NEXT_LABEL).click();
    assertEquals("col1",
            bot.textWithLabel(org.bonitasoft.studio.connectors.i18n.Messages.takeValueOf).getText());
    bot.button(IDialogConstants.BACK_LABEL).click();

    bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.nRowOneCol).click();
    bot.button(IDialogConstants.NEXT_LABEL).click();
    assertEquals("col1",
            bot.textWithLabel(org.bonitasoft.studio.connectors.i18n.Messages.takeValueOf).getText());
    bot.button(IDialogConstants.BACK_LABEL).click();

    bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.scriptMode).click();
    bot.button(IDialogConstants.NEXT_LABEL).click();
    assertEquals("resultset", bot.textWithId(SWTBOT_ID_EXPRESSIONVIEWER_TEXT, 1).getText());
    bot.button(IDialogConstants.BACK_LABEL).click();

    bot.checkBox(org.bonitasoft.studio.connectors.i18n.Messages.alwaysUseScriptingMode).click();
    bot.button(IDialogConstants.BACK_LABEL).click();
    bot.styledText().setText(QUERY2);
    bot.button(IDialogConstants.NEXT_LABEL).click();

    assertTrue(bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.scriptMode).isSelected());
    assertTrue(bot.checkBox(org.bonitasoft.studio.connectors.i18n.Messages.alwaysUseScriptingMode).isChecked());

    assertFalse(bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.singleValue).isEnabled());
    assertFalse(bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.oneRowNCol).isEnabled());
    assertFalse(bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.nRowOneCol).isEnabled());
    assertFalse(bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.nRowsNcolumns).isSelected());

    bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.graphicalMode).click();
    assertFalse(bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.singleValue).isEnabled());
    assertTrue(bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.oneRowNCol).isEnabled());
    assertFalse(bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.nRowOneCol).isEnabled());
    assertTrue(bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.nRowsNcolumns).isSelected());
    assertFalse(
            bot.checkBox(org.bonitasoft.studio.connectors.i18n.Messages.alwaysUseScriptingMode).isEnabled());
    assertFalse(
            bot.checkBox(org.bonitasoft.studio.connectors.i18n.Messages.alwaysUseScriptingMode).isChecked());

    bot.radio(org.bonitasoft.studio.connectors.i18n.Messages.oneRowNCol).click();
    bot.button(IDialogConstants.NEXT_LABEL).click();
    assertTrue(bot.text("col1").isVisible());
    assertTrue(bot.text("col2").isVisible());
    assertTrue(bot.text("col3").isVisible());
    bot.button(IDialogConstants.FINISH_LABEL).click();
    bot.activeEditor().save();
}

From source file:org.bonitasoft.studio.connectors.test.exporter.SWTBotConnectorExportTests.java

License:Open Source License

@Test
public void testUserConnectorExportWithTranslations() throws Exception {
    final int nbEditorsBefore = bot.editors().size();
    final String id = "connectorTest2";
    final String version = "1.0.0";
    final String className = "MyConnectorTest2";
    final String packageName = "org.bonitaSoft.studioTests";
    final String userConnector = id + "-impl (" + version + ")" + " -- " + packageName + "." + className;
    final String fileName = "connectorTest2-impl-1.0.0.zip";
    final String language1 = "de";
    final String language2 = "sq";
    SWTBotConnectorTestUtil.createConnectorDefAndImpl(bot, id, version, className, packageName);
    SWTBotConnectorTestUtil.activateConnectorDefEditionShell(bot);
    bot.tree().expandNode("Uncategorized").select(id + " (" + version + ")");
    bot.button(Messages.Edit).click();/*from  w  w w  .  j a v  a 2s.  c  om*/
    bot.waitUntil(Conditions.shellIsActive("Edit connector definition"));
    bot.button(IDialogConstants.NEXT_LABEL).click();
    bot.button(IDialogConstants.NEXT_LABEL).click();
    bot.button(IDialogConstants.NEXT_LABEL).click();
    bot.button(IDialogConstants.NEXT_LABEL).click();
    int line = bot.table().indexOf(language1, "Locale");
    bot.table().getTableItem(line).check();
    line = bot.table().indexOf(language2, "Locale");
    bot.table().getTableItem(line).check();
    bot.button(IDialogConstants.FINISH_LABEL).click();
    bot.waitUntil(new ICondition() {

        public boolean test() throws Exception {
            return nbEditorsBefore + 3 == bot.editors().size();
        }

        public void init(SWTBot bot) {
        }

        public String getFailureMessage() {
            return "Editor for implementation has not been opened.";
        }
    }, 30000);
    exportConnector(userConnector, fileName, false, true);
    //String dirName = fileName.substring(0, fileName.lastIndexOf("."));
    File destDir = new File(ProjectUtil.getBonitaStudioWorkFolder().getAbsolutePath());
    assertNotNull(" unzip exported connector dir does not exist", destDir);
    assertTrue("dest dir doesn't exist", destDir.exists());
    Set<String> fileNames = new HashSet<String>();
    fileNames.add("connectorTest2-1.0.0.properties");
    fileNames.add("connectorTest2-1.0.0_sq.properties");
    fileNames.add("connectorTest2-1.0.0_de.properties");
    checkMessageFiles(destDir, fileNames);
}

From source file:org.bonitasoft.studio.connectors.test.swtbot.ConnectorDefinitionTranslationsTest.java

License:Open Source License

private void openConnectorDefinitionWizardPage(String id, String categoryId) throws Exception {
    final String packageLang = "java.lang.";
    final String packageUtil = "java.util.";
    SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
    Keyboard key = KeyboardFactory.getSWTKeyboard();
    SWTBotConnectorTestUtil.activateConnectorDefinitionShell(bot);
    SWTBotConnectorTestUtil.createConnectorDefinition(bot, id, "1.0.0");
    SWTBotConnectorTestUtil.createNewCategory(bot, categoryId);
    bot.button(IDialogConstants.NEXT_LABEL).click();
    SWTBotTable table = bot.table();/* w ww . ja  va  2s . c  om*/
    bot.button("Add...").click();
    bot.button("Add...").click();
    bot.button("Add...").click();
    bot.button("Add...").click();
    table.click(1, 2);
    bot.ccomboBox().setSelection(packageLang + "Boolean");
    key.pressShortcut(Keystrokes.CR);
    bot.button("Add...").click();
    table.click(2, 2);
    bot.ccomboBox().setSelection(packageLang + "Double");
    key.pressShortcut(Keystrokes.CR);
    bot.button("Add...").click();
    table.click(3, 2);
    bot.ccomboBox().setSelection(packageLang + "Float");
    key.pressShortcut(Keystrokes.CR);
    bot.button("Add...").click();
    table.click(4, 2);
    bot.ccomboBox().setSelection(packageLang + "Integer");
    key.pressShortcut(Keystrokes.CR);
    bot.button("Add...").click();
    table.click(5, 2);
    bot.ccomboBox().setSelection(packageUtil + "List");
    key.pressShortcut(Keystrokes.CR);
    bot.button("Add...").click();
    table.click(6, 2);
    bot.ccomboBox().setSelection(packageUtil + "Map");
    key.pressShortcut(Keystrokes.CR);
    bot.button(IDialogConstants.NEXT_LABEL).click();

}

From source file:org.bonitasoft.studio.connectors.test.swtbot.ConnectorDefinitionTranslationsTest.java

License:Open Source License

@Test
public void testConnectorDefinitionTranslation() throws Exception {
    final int nbEditorsBefore = bot.editors().size();
    final String language = "en";
    bot.button(IDialogConstants.NEXT_LABEL).click();
    bot.button(IDialogConstants.NEXT_LABEL).click();
    int line = bot.table().indexOf(language, "Locale");
    bot.table().getTableItem(line).check();
    bot.button(IDialogConstants.FINISH_LABEL).click();
    ConnectorDefRepositoryStore store = (ConnectorDefRepositoryStore) RepositoryManager.getInstance()
            .getRepositoryStore(ConnectorDefRepositoryStore.class);
    DefinitionResourceProvider resourceProvider = DefinitionResourceProvider.getInstance(store,
            ConnectorPlugin.getDefault().getBundle());
    List<File> resources = resourceProvider
            .getExistingLocalesResource(store.getDefinition("testTranslationWizardPage", "1.0.0"));
    assertEquals("resources list should contain 2 resources", resources.size(), 2);
    for (File file : resources) {
        if (file.getName().contains("_en")) {
            Properties properties = new Properties();
            InputStream stream = new FileInputStream(file);
            properties.load(stream);// w w  w  .j a  v a  2  s  . co  m
            assertTrue("properties file doesn't contain key widgetTest4.description",
                    properties.containsKey("widgetTest4.description"));
            assertTrue("properties file doesn't contain key widgetTest2.description",
                    properties.containsKey("widgetTest2.description"));
            assertTrue("properties file doesn't contain key widgetTest0.description",
                    properties.containsKey("widgetTest0.description"));
            assertTrue("properties file doesn't contain key widgetTest5.description",
                    properties.containsKey("widgetTest5.description"));
            assertTrue("properties file doesn't contain key widgetTest3.description",
                    properties.containsKey("widgetTest3.description"));
            assertTrue("properties file doesn't contain key widgetTest1.description",
                    properties.containsKey("widgetTest1.description"));
            assertTrue("properties file doesn't contain key widgetTest4.label",
                    properties.containsKey("widgetTest4.label"));
            assertTrue("properties file doesn't contain key widgetTest2.label",
                    properties.containsKey("widgetTest2.label"));
            assertTrue("properties file doesn't contain key widgetTest0.label",
                    properties.containsKey("widgetTest0.label"));
            assertTrue("properties file doesn't contain key widgetTest5.label",
                    properties.containsKey("widgetTest5.label"));
            assertTrue("properties file doesn't contain key widgetTest3.label",
                    properties.containsKey("widgetTest3.label"));
            assertTrue("properties file doesn't contain key widgetTest1.label",
                    properties.containsKey("widgetTest1.label"));
            assertTrue("properties file doesn't contain key category1.category",
                    properties.containsKey("categoryEWP.category"));
            assertTrue("properties file doesn't contain key pageTest.pageDescription",
                    properties.containsKey("pageTest.pageDescription"));
            assertTrue("properties file doesn't contain key pageTest.pageTitle",
                    properties.containsKey("pageTest.pageTitle"));
            stream.close();
        }

    }
    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 new diagram has not been opened.";
        }
    }, 30000);
}

From source file:org.bonitasoft.studio.connectors.test.swtbot.ConnectorDefinitionWizardPageTest.java

License:Open Source License

private void openConnectorDefinitionWizardPage(String id) {
    final String packageLang = "java.lang.";
    final String packageUtil = "java.util.";
    SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
    Keyboard key = KeyboardFactory.getSWTKeyboard();
    SWTBotConnectorTestUtil.activateConnectorDefinitionShell(bot);
    SWTBotConnectorTestUtil.createConnectorDefinition(bot, id, "1.0.0");
    bot.button(IDialogConstants.NEXT_LABEL).click();
    SWTBotTable table = bot.table();/*from ww w.ja  v a  2  s .co m*/
    bot.button("Add...").click();
    bot.button("Add...").click();
    bot.button("Add...").click();
    bot.button("Add...").click();
    table.click(1, 2);
    bot.ccomboBox().setSelection(packageLang + "Boolean");
    key.pressShortcut(Keystrokes.CR);
    bot.button("Add...").click();
    table.click(2, 2);
    bot.ccomboBox().setSelection(packageLang + "Double");
    key.pressShortcut(Keystrokes.CR);
    bot.button("Add...").click();
    table.click(3, 2);
    bot.ccomboBox().setSelection(packageLang + "Float");
    key.pressShortcut(Keystrokes.CR);
    bot.button("Add...").click();
    table.click(4, 2);
    bot.ccomboBox().setSelection(packageLang + "Integer");
    key.pressShortcut(Keystrokes.CR);
    bot.button("Add...").click();
    table.click(5, 2);
    bot.ccomboBox().setSelection(packageUtil + "List");
    key.pressShortcut(Keystrokes.CR);
    bot.button("Add...").click();
    table.click(6, 2);
    bot.ccomboBox().setSelection(packageUtil + "Map");
    key.pressShortcut(Keystrokes.CR);
    bot.button(IDialogConstants.NEXT_LABEL).click();

}