| Summary: | Refactor hiding related parts of Zest.FX | ||
|---|---|---|---|
| Product: | [Tools] GEF | Reporter: | Alexander Nyßen <nyssen> |
| Component: | GEF Zest | Assignee: | gef-inbox <gef-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | matthias.wienand |
| Version: | 0.2.0 | ||
| Target Milestone: | 4.0.0 / 3.11.0 (Neon) M4 | ||
| Hardware: | PC | ||
| OS: | Mac OS X | ||
| Whiteboard: | |||
|
Description
Alexander Nyßen
As a start, I performed some initial cleanup: - Split HideNodePolicy into HidePolicy and ShowHiddenNeighboursPolicy and ensured both extend AbstractTransactionPolicy. - Extracted ShowHiddenNeightboursOnTypePolicy from HideOnTypePolicy. - Split ExpandFirstAnchorageOnClickPolicy into ShowHiddenNeighboursOfFirstAnchorageOnClickPolicy and HideFirstAnchorageOnClickPolicy. - Changed NodeHidingBehavior now extends AbstractHidingBehavior. - Renamed HiddenNeighboursPart to HiddenNeighboursFeedbackPart. - Renamed ZestFxExpandingHandlePart to ShowHiddenNeighboursHandlePart. - Renamed ZestFxHidingHandlePart to HideHandlePart. A closer look is still needed. (In reply to Alexander Nyßen from comment #0) > First, the HidingBehaviors have to be merged into the > respective policies. That does not seem to be appropriate, a behavior is ok here. However, we could think of centralizing it to the root part, so everything could be updated in a single place. Further, the hiding model could hold references to IContentParts, rather than content elements. That would make the reverse lookup, using the content part map, obsolete. Performed some further refactorings: - Renamed HideOnType to HideOnTypePolicy. - Remove HoverFirstAnchorageOnHoverPolicy, as it does not seem to be needed. - Adjusted image constant names in ShowHiddenNeighborsHandlePart and HideHandlePart - Removed unnecessary register() overwrite within AbstractHidingHandlePart, ensured unregister is performed properly. - Remove unnecessary anchorage change listening in NodeHidingBehavior. Continued refactoring (hover handle parts): -Extracted functionality for registering and unregistering nested visuals from AbstractFXContentPart into FXPartUtils and ensured the logic is also applied by AbstractFXHandlePart and AbstractFXFeedbackPart. -Removed AbstractHidingHandlePart, as it predominantly took care of registering/unregistering the nested visuals (which is now already performed by the super class AbstractFXHandlePart). -Renamed HideHandlePart to HideHoverHandlePart, and ShowHiddenNeighborsHandlePart to ShowHiddenNeighborsHoverHandlePart. I ensured that the interaction policies that make use of the HidePolicy or the ShowHiddenNeighborsPolicy do execute the respective commit operation on the operation history. Furthermore, I extended the HidingModel API to also allow passing in NodeContentPart objects, so that the code using the model does not need to lookup content parts/content objects. Complementary to the rest of the API, I introduced a ShowHiddenNeighborsOperation. The respective code was previously contained within ShowHiddenNeighborsPolicy. The code is published on the master branch. Therefore, I resolve this ticket as fixed for 3.11.0M4. |