Add "Change IRI" (rename entity) action to hierarchy context menu#830
Open
henliao wants to merge 1 commit into
Open
Add "Change IRI" (rename entity) action to hierarchy context menu#830henliao wants to merge 1 commit into
henliao wants to merge 1 commit into
Conversation
Wire the existing server-side ChangeEntityIRIAction into the WebProtege client. Right-clicking an entity in the hierarchy tree now offers a "Change IRI..." item that prompts for a new IRI (pre-filled with the current one) and dispatches the rename. The action is gated on the EDIT_ONTOLOGY permission and enabled only for a single selection, and the tree is refreshed on success.
|
By popular request from BMDS 210 :-) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
WebProtégé already ships a fully-implemented server-side rename:
ChangeEntityIRIActionandChangeEntityIRIActionHandler(permission-gated onEDIT_ONTOLOGY). However, nothing in the client ever dispatches it, so there is no way to change an entity's IRI from the UI (desktop Protégé has this under right-click → Refactor → Change IRI; WebProtégé did not).This PR wires that existing capability into the client. Right-clicking an entity in the class/property hierarchy tree now offers a "Change IRI..." item.
Changes
ChangeEntityIRIUiAction(client): prompts for a new IRI viaInputBox, pre-filled with the entity's current IRI; on confirm, dispatchesChangeEntityIRIAction. No-ops on empty/unchanged input. Refreshes the tree on success.EntityHierarchyContextMenuPresenter: adds the menu item (next to Merge), wires a single-selection supplier and a refresh handler, and gates the item onEDIT_ONTOLOGY+ a single selection (mirroring the existing actions).Messages: adds thechangeEntityIrilabel ("Change IRI...").Because the context-menu presenter is
@AutoFactory, the new action is injected as a@Provideddependency; existingcreate(...)call sites are unchanged, so this applies to both the class hierarchy and property hierarchy portlets.Notes / open questions
TODOs (mentions of the entity and match-criteria references are not yet rewritten on rename). This PR does not change server behaviour; it only exposes the existing action.EDIT_ONTOLOGY).Test plan
mvn compilesucceeds (verified locally for the client module + deps).EDIT_ONTOLOGYand when multiple nodes are selected.