Skip to content

Commit

Permalink
Merge pull request #90 from protegeproject/32-linearization-view-titl…
Browse files Browse the repository at this point in the history
…e-should-also-contain-the-currently-selected-entity-name

32 linearization view title should also contain the currently selected entity name
  • Loading branch information
alexsilaghi authored Dec 18, 2024
2 parents 3f52b61 + c5eb58c commit d39832e
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import edu.stanford.bmir.protege.web.shared.hierarchy.*;
import edu.stanford.bmir.protege.web.shared.linearization.*;
import edu.stanford.bmir.protege.web.shared.project.ProjectId;
import edu.stanford.bmir.protege.web.shared.renderer.GetEntityRenderingAction;
import edu.stanford.webprotege.shared.annotations.Portlet;
import org.semanticweb.owlapi.model.OWLEntity;

Expand Down Expand Up @@ -63,9 +64,10 @@ public LinearizationPortletPresenter(@Nonnull SelectionModel selectionModel,

@Override
public void startPortlet(PortletUi portletUi, WebProtegeEventBus eventBus) {
portletUi.setWidget(view.asWidget());
setDisplaySelectedEntityNameAsSubtitle(true);

dispatch.execute(GetLinearizationDefinitionsAction.create(), result -> {
portletUi.setWidget(view.asWidget());
setDisplaySelectedEntityNameAsSubtitle(true);
for (LinearizationDefinition definition : result.getDefinitionList()) {
this.definitionMap.put(definition.getWhoficEntityIri(), definition);
}
Expand Down Expand Up @@ -102,6 +104,8 @@ protected void handleAfterSetEntity(Optional<OWLEntity> entityData) {

private void navigateToEntity(Optional<OWLEntity> entityData) {
if (entityData.isPresent()) {
dispatch.execute(GetEntityRenderingAction.create(getProjectId(), entityData.get()),
(result) -> setDisplayedEntity(Optional.of(result.getEntityData())));
this.entityParentsMap.clear();
dispatch.execute(GetEntityLinearizationAction.create(entityData.get().getIRI().toString(), this.getProjectId()), response -> {

Expand All @@ -126,6 +130,5 @@ private void navigateToEntity(Optional<OWLEntity> entityData) {

private void handleSetEntity(Optional<OWLEntity> entity) {
handleAfterSetEntity(entity);

}
}

0 comments on commit d39832e

Please sign in to comment.