-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FirstInstance refactoring changes (refined) #9
Draft
AlpTorac
wants to merge
35
commits into
CIPM-tools:build-pipeline
Choose a base branch
from
AlpTorac:fi-ref-splitted
base: build-pipeline
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
from SimilarityChecker and related classes
Implement requests and handlers for certain similarity checking operations used in Java similarity switches Helps centralise the said operations Helps encapsulates some parameters that would otherwise unnecessarily clutter similarity checker and similarity switches
Builds upon the ...similarity.base package, extends and complements its elements with EMFtext Provides exemplary similarity checking requests and handlers (using them is not mandatory)
For Java-related similarity switches Currently empty Can help separate Java-related similarity switches from the rest in the future
to keep the logging logic for Java-related inner switches in one place
For Java-related inner switches to not implement some mutual operations multiple times
Created for Java-related similarity checking
For PCM-related similarity switches
For PCM-related inner similarity switches
For PCM-related similarity checker Use the extracted structure
For ID-based similarity checking of PCMs A separate similarity checker implementation will no longer be necessary To be integrated in the following future commits
For Java-related similarity checking
For logging Java-related inner switches
To their own files without modifying them Non-functional commit
Rename SimilaritySwitch to JavaSimilaritySwitch to indicate its intent better Use the extracted inner switches in the JavaSimilaritySwitch Non-functional commit
To create new Java-related similarity switches Non-functional commit
For Java-related inner switches that create further switches Non-functional commit
Use extracted structure in the Java-related inner switches Use implemented interfaces in the Java-related inner switches Non-functional commit
Non-functional commit
For Java-related similarity checking Non-functional commit
Rename SimilarityChecker to JavaSimilarityChecker Use the extracted structure in the JavaSimilarityChecker Delegate similarity switch creation by using a new similarity switch request Non-functional commit
Adapt classes affected by the changes to the Java-related part of the similarity checking Non-functional commit
To their own files without modifying them Non-functional commit
Use the extracted structure in PCM-related similarity switch Use extracted inner switches in PCM-related similarity switch Non-similarity switch
For creating new PCM-related similarity switches Non-functional commit
For PCM-related inner switches that create further switches Non-functional commit
Use implemented interfaces in PCM-related inner switches Use extracted structure in PCM-related inner switches Non-functional commit
For PCM similarity checker construction Non-functional commit
Non-functional commit
The dynamic toolbox can be set to use ID-based similarity checking handler Non-functional commit
To the PCM related similarity checker construction The FirstInstance should now work in a vacuum SecondInstance is not adapted to the changes yet
The SecondInstance should now work with the preceding changes to FirstInstance
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.
Introduction
This pull requests contains several refactoring changes to the FirstInstance, which are explained in the attached files by the end of the following section. Additionally, interfaces (and some "package-info.java" files) implemented within this pull request contain commentary, explaining the interactions and the intents between their implementors.
The changes within this pull request have been tested with the Teammates tests and have passed successfully.
Note: There is a follow-up pull request (#10) that contains further null checks for similarity checking constructs. Another, separate pull request (#8) is opened for adding further null checks to some utility classes. They are moved to separate pull requests, since they are not exactly a part of the refactoring done here.
About The Commits
In order to make the changes more visible, many non-functional (i.e. compiling the project results in errors) commits were included. Such commits are marked with the "(WIP)" in their names as well as their commit messages.
The commits are ordered in a way that keeps the non-functional chain of commits as short as possible. Therefore, some interfaces and constructs that become relevant later are introduced beforehand.
All commits, except the latest one (89e0875), only modify files/subdirectories under the bundles/fi directory. In other words, they only modify the FirstInstance.
In normalisation-related elements, LinkedHashMap<X, Y> in signatures was changed to Map<X, Y>. They still use LinkedHashMap in the background, just signatures are changed.
Descriptions to individual classes/interfaces can be found as commentary in their respective files. "package-info.java" files within certain packages explain interactions between their contents and further elaborations. The overview of these changes and a demonstration on how to construct a SimilarityChecker, as well as how similarity checking works with those changes can be found in the attached files:
CIPM changes.pdf
Future Ideas
An iterator class for ISimilarityToolbox could be useful for extracting the order of handling and/or the amount of handlers being applied to a given ISimilarityRequest.
Enabling "merging" of ISimilarityToolbox instances could be useful, if using separate ISimilarityToolbox instances for certain request-handler pairs can benefit future implementations.
Allowing access to request-handler pairs in ISimilarityToolbox and offering further methods to modify the stored pairs could be useful.