Skip to content

Commit

Permalink
wip added comment for reason for change for edit parents
Browse files Browse the repository at this point in the history
  • Loading branch information
soimugeoWB committed May 27, 2024
1 parent 4374137 commit c915dbc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import edu.stanford.bmir.protege.web.shared.hierarchy.ChangeEntityParentsAction;
import edu.stanford.bmir.protege.web.shared.hierarchy.GetHierarchyParentsAction;
import edu.stanford.bmir.protege.web.shared.hierarchy.HierarchyId;
import edu.stanford.bmir.protege.web.shared.issues.CreateEntityDiscussionThreadAction;
import edu.stanford.bmir.protege.web.shared.project.ProjectId;
import edu.stanford.bmir.protege.web.shared.renderer.GetEntityRenderingAction;
import org.semanticweb.owlapi.model.EntityType;
Expand Down Expand Up @@ -84,10 +85,8 @@ public void start(@Nonnull OWLEntity entity) {
dispatch.execute(GetEntityRenderingAction.create(projectId, entity),
result -> view.setOwlEntityData(result.getEntityData()));

hierarchyId.ifPresent(id -> {
dispatch.execute(GetHierarchyParentsAction.create(projectId, entity, id),
result -> view.setEntityParents(result.getParents()));
});
hierarchyId.ifPresent(id -> dispatch.execute(GetHierarchyParentsAction.create(projectId, entity, id),
result -> view.setEntityParents(result.getParents())));
}

@Nonnull
Expand All @@ -104,6 +103,9 @@ private void handleHierarchyChange(OWLEntity entity, List<OWLPrimitiveData> pare
.map(owlPrimitiveData -> owlPrimitiveData.asEntity().get().asOWLClass())
.collect(toImmutableSet());
dispatch.execute(ChangeEntityParentsAction.create(projectId, parentsSet, entity.asOWLClass(), view.getReasonForChange()),
changeEntityParentsResult -> {});
changeEntityParentsResult -> dispatch.execute(
CreateEntityDiscussionThreadAction.create(projectId, entity, view.getReasonForChange()),
threadActionResult -> {
}));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,6 @@ public String getReasonForChange() {

@Override
public List<OWLPrimitiveData> getNewParentList() {
return this.domains.getValue().orElseGet(() -> {
return new ArrayList<OWLPrimitiveData>();
});
return this.domains.getValue().orElseGet(ArrayList::new);
}
}

0 comments on commit c915dbc

Please sign in to comment.