public void testOpenTableRepresentation() throws Exception {
   if (TestsUtil.shouldSkipUnreliableTests()) {
     /*
     org.eclipse.swtbot.swt.finder.widgets.TimeoutException: Timeout after: 10000 ms.: tree item with text  is not selected
     at org.eclipse.swtbot.swt.finder.SWTBotFactory.waitUntil(SWTBotFactory.java:407)
     at org.eclipse.swtbot.swt.finder.SWTBotFactory.waitUntil(SWTBotFactory.java:381)
     at org.eclipse.swtbot.swt.finder.SWTBotFactory.waitUntil(SWTBotFactory.java:369)
     at org.eclipse.sirius.tests.swtbot.support.api.business.UIProject.getUIItemFromResource(UIProject.java:157)
     at org.eclipse.sirius.tests.swtbot.support.api.business.UIProject.selectResource(UIProject.java:122)
     at org.eclipse.sirius.tests.swtbot.support.api.business.UIPerspective.openSessionCreationWizardFromSemanticResource(UIPerspective.java:188)
     at org.eclipse.sirius.tests.swtbot.OpenMultipleRepresentationsTest.onSetUpAfterOpeningDesignerPerspective(OpenMultipleRepresentationsTest.java:61)
     */
     return;
   }
   SWTBotTreeItem modelElementItem =
       localSession.getLocalSessionBrowser().perSemantic().expandNode("root").click();
   final UITableRepresentation tableRepresentation =
       localSession
           .newTableRepresentation("Classes in root package")
           .on(modelElementItem)
           .withDefaultName()
           .ok();
   final SWTBotEditor editor = tableRepresentation.open().getEditor();
   assertEditorIsNotError("editor was an error one", editor);
 }
  /** Check that the creation tools are accessible on contextual menu */
  private void checkContextualMenuTableRepresentation() {
    // Reduce timeout
    final long oldTimeout = SWTBotPreferences.TIMEOUT;
    table.getTable().getTreeItem(CLASS1).select().contextMenu("Create Class");
    table.getTable().getTreeItem(CLASS1).select().contextMenu("line");
    try {
      SWTBotPreferences.TIMEOUT = 500;
      table.getTable().getTreeItem(CLASS1).select().contextMenu(CREATION_TOOL);
      fail("This tool should not be present");

    } catch (TimeoutException tme) {
      // DO NOTHINGS, it's the good behavior
    } finally {
      SWTBotPreferences.TIMEOUT = oldTimeout;
    }
  }
  public void testOpenDiagramAndTableRepresentations() throws Exception {

    SWTBotTreeItem modelElementItem =
        localSession.getLocalSessionBrowser().perSemantic().expandNode("root").click();
    final UIDiagramRepresentation diagramRepresentation =
        localSession
            .newDiagramRepresentation("root" + " package entities")
            .on(modelElementItem)
            .withDefaultName()
            .ok();
    final SWTBotSiriusDiagramEditor diagramEditor = diagramRepresentation.open().getEditor();

    SWTBotTreeItem modelElementItem2 =
        localSession.getLocalSessionBrowser().perSemantic().expandNode("root").click();
    final UITableRepresentation tableRepresentation =
        localSession
            .newTableRepresentation("Classes in root package")
            .on(modelElementItem2)
            .withDefaultName()
            .ok();
    final SWTBotEditor tableEditor = tableRepresentation.open().getEditor();
    assertEditorIsNotError("editor was an error one", tableEditor);
    assertEditorIsNotError("editor was an error one", diagramEditor);
  }
 private void checkContextualMenuMenuTableRepresentationRefreshed() {
   table.getTable().setFocus();
   table.getTable().getTreeItem(CLASS1).select().contextMenu("Create Class");
   table.getTable().getTreeItem(CLASS1).select().contextMenu("line");
   table.getTable().getTreeItem(CLASS1).select().contextMenu(CREATION_TOOL);
 }