[GEF] Finalize GEF cleanup for the current development cycle #631
Merged
ptziegler merged 5 commits intoeclipse-windowbuilder:masterfrom Nov 12, 2023
Merged
[GEF] Finalize GEF cleanup for the current development cycle #631ptziegler merged 5 commits intoeclipse-windowbuilder:masterfrom
ptziegler merged 5 commits intoeclipse-windowbuilder:masterfrom
Conversation
64cbac7 to
7210975
Compare
Both methods are functionally identical. The reason we should use the latter one is because this method is specified in the EditPart interface.
7210975 to
dda0c15
Compare
This is the way we are supposed to handle those instances for a given EditPartViewer. Doing so saves us not only a local field but also the getEditPartByModel() method in the IEditPartViewer interface.
This removes the superfluous IRootContainer interface. Trying to get root edit part should instead return an instance implementing the RootEditPart interface.
In order to get the DragTracker of a given EditPart, one can either call getDrackTracker (GEF) or getDrackTrackerTool(WB). This change refactors the our code so that only the GEF method remains. Note that this change requires a noticeable cleanup in our Tool implementation, in order to make sure that the methods defined by the Tool interface don't call the implementations of the parent class.
This removes the local fields that store the policies (and keys) installed for a given edit part. All invocations are forwarded to the implementation of the parent class. Note that those methods work on a GEF EditPolicy. To avoid any incompatibilities, it was required to also remove the local "host" field of our EditPolicy and rely on the parent implementation here as well.
dda0c15 to
af6c6e3
Compare
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.
This change should bring our GEF implementation to a point where it is stable enough for the upcoming release. I've also had a look at continuing my work on our Draw2D code, but those adaptations have to be postponed to the 1.15.