Beispiel #1
0
  /**
   * Create the new model.
   *
   * @param modelName
   * @param root
   * @param extension
   */
  private void createModel(String modelName, EClass root, final String extension) {
    final String modelType = StringHelper.toU1Case(extension) + " Model";
    final SWTBotTreeItem item =
        tree().expandNode("EMF Editing Framework").expandNode("EMF Model").select();
    assertNotNull("The model " + modelType + " can not be created.", item);
    button(UIConstants.NEXT_BUTTON).click();

    button("Browse Registered Packages...").click();
    final String nsURI =
        interpreter.getPropertiesEditionContext().getModel().getEcorePackage().getNsURI();
    table().getTableItem(nsURI).select();
    button(UIConstants.OK_BUTTON).click();
    button(UIConstants.NEXT_BUTTON).click();

    textWithLabel(IDEWorkbenchMessages.WizardNewFileCreationPage_fileLabel).setText(modelName);
    button(UIConstants.NEXT_BUTTON).click();
    assertNotNull("The class " + root.toString() + " can not be loaded", root.getName());

    comboBox().setSelection(root.getName());
    button(UIConstants.FINISH_BUTTON).click();
  }