/**
  * Gets the project for this tab.
  *
  * @return The {@link Project}. Not {@code null}.
  */
 public Project getProject() {
   Optional<Project> project = ProjectManager.get().getProject(projectId);
   if (!project.isPresent()) {
     throw new IllegalStateException("Unknown project: " + project);
   }
   return project.get();
 }
  protected ClassTreePortlet createSelectable() {
    Optional<Project> prj = ProjectManager.get().getProject(projectId);
    if (!prj.isPresent()) {
      throw new UnknownProjectException(projectId);
    }
    ClassTreePortlet treePortlet =
        new ClassTreePortlet(prj.get(), false, false, false, allowMultipleSelection, topClass);
    treePortlet.setDraggable(false);
    treePortlet.setClosable(false);
    treePortlet.setCollapsible(false);
    treePortlet.setHeight(300);
    treePortlet.setWidth(450);

    return treePortlet;
  }
 protected void createOntolgyForm() {
   Project project = ProjectManager.get().getProject(projectId).get();
   List<AbstractTab> tabs =
       project.getLayoutManager().createTabs(project.getProjectLayoutConfiguration());
   for (AbstractTab tab : tabs) {
     addTab(tab);
     updateTabStyle(tab);
   }
   if (tabs.size() > 0) {
     activate(0);
   }
   if (UIUtil.getBooleanConfigurationProperty(
       project.getProjectLayoutConfiguration(), SHOW_ONTOLOGY_TOOLBAR, true)) {
     createToolbarButtons();
   }
   doLayout();
 }
 public String getLabel() {
   return ProjectManager.get().getProject(projectId).get().getProjectDetails().getDisplayName();
 }