-
Notifications
You must be signed in to change notification settings - Fork 59
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
Use custom class loaders to load Languagetool dependencies #2248
Open
Auriga2
wants to merge
38
commits into
master
Choose a base branch
from
feature/spellCheck
base: master
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
…s context menu, auto complete etc. and make the UI similar to the javafx TextArea
…able/disable spell checking
…ng, workaround to fix the slowness in initial spellcheck etc.
# Conflicts: # CorePluginFramework/src/au/gov/asd/tac/constellation/plugins/parameters/PluginParameter.java
# Conflicts: # CoreDataAccessView/src/au/gov/asd/tac/constellation/views/dataaccess/plugins/experimental/TestParametersPlugin.java # CorePreferences/src/au/gov/asd/tac/constellation/preferences/ApplicationOptionsPanel.form # CorePreferences/src/au/gov/asd/tac/constellation/preferences/ApplicationOptionsPanel.java # CoreWhatsNewView/src/au/gov/asd/tac/constellation/views/whatsnew/whatsnew.txt
…ected previously and improvements.
# Conflicts: # CorePreferences/src/au/gov/asd/tac/constellation/preferences/ApplicationOptionsPanel.form # CorePreferences/src/au/gov/asd/tac/constellation/preferences/ApplicationOptionsPanel.java # CorePreferences/src/au/gov/asd/tac/constellation/preferences/ApplicationOptionsPanelController.java # CorePreferences/src/au/gov/asd/tac/constellation/preferences/Bundle.properties # CoreWhatsNewView/src/au/gov/asd/tac/constellation/views/whatsnew/whatsnew.txt
…l and main app * add a message explaining the error or when no suggestions available
# Conflicts: # CoreDependencies/nbproject/project.xml # CoreDependencies/src/ivy.xml # CoreWhatsNewView/src/au/gov/asd/tac/constellation/views/whatsnew/whatsnew.txt
… conflicts using "Resolve using 'theirs'"
# Conflicts: # CorePluginFramework/src/au/gov/asd/tac/constellation/plugins/gui/PluginParametersPane.java # CorePluginFramework/src/au/gov/asd/tac/constellation/plugins/gui/ValueInputPane.java # CorePreferences/src/au/gov/asd/tac/constellation/preferences/ApplicationOptionsPanel.form # CorePreferences/src/au/gov/asd/tac/constellation/preferences/ApplicationOptionsPanel.java
…indriya version conflicts
OrionsGuardian
requested changes
Jan 13, 2025
...ilities/src/au/gov/asd/tac/constellation/utilities/text/LanguageToolDependencyUrlLoader.java
Outdated
Show resolved
Hide resolved
...ilities/src/au/gov/asd/tac/constellation/utilities/text/LanguageToolDependencyUrlLoader.java
Outdated
Show resolved
Hide resolved
...ilities/src/au/gov/asd/tac/constellation/utilities/text/LanguageToolDependencyUrlLoader.java
Outdated
Show resolved
Hide resolved
...ilities/src/au/gov/asd/tac/constellation/utilities/text/LanguageToolDependencyUrlLoader.java
Outdated
Show resolved
Hide resolved
CoreUtilities/src/au/gov/asd/tac/constellation/utilities/text/LanguagetoolClassLoader.java
Outdated
Show resolved
Hide resolved
CoreUtilities/src/au/gov/asd/tac/constellation/utilities/text/SpellChecker.java
Outdated
Show resolved
Hide resolved
CoreUtilities/src/au/gov/asd/tac/constellation/utilities/text/SpellChecker.java
Outdated
Show resolved
Hide resolved
CoreUtilities/src/au/gov/asd/tac/constellation/utilities/text/SpellChecker.java
Outdated
Show resolved
Hide resolved
CoreUtilities/src/au/gov/asd/tac/constellation/utilities/text/SpellChecker.java
Outdated
Show resolved
Hide resolved
CoreUtilities/src/au/gov/asd/tac/constellation/utilities/text/SpellChecker.java
Outdated
Show resolved
Hide resolved
antares1470
requested changes
Jan 20, 2025
CorePluginFramework/src/au/gov/asd/tac/constellation/plugins/gui/PasswordInputPane.java
Outdated
Show resolved
Hide resolved
...ilities/src/au/gov/asd/tac/constellation/utilities/text/LanguageToolDependencyUrlLoader.java
Outdated
Show resolved
Hide resolved
CoreUtilities/src/au/gov/asd/tac/constellation/utilities/text/LanguageToolStartUpLoad.java
Outdated
Show resolved
Hide resolved
CoreUtilities/src/au/gov/asd/tac/constellation/utilities/text/LanguagetoolClassLoader.java
Outdated
Show resolved
Hide resolved
CoreUtilities/src/au/gov/asd/tac/constellation/utilities/text/SpellChecker.java
Outdated
Show resolved
Hide resolved
CoreUtilities/src/au/gov/asd/tac/constellation/utilities/text/SpellChecker.java
Outdated
Show resolved
Hide resolved
CoreUtilities/src/au/gov/asd/tac/constellation/utilities/text/SpellChecker.java
Outdated
Show resolved
Hide resolved
CoreUtilities/src/au/gov/asd/tac/constellation/utilities/text/SpellCheckingTextArea.java
Outdated
Show resolved
Hide resolved
CoreUtilities/src/au/gov/asd/tac/constellation/utilities/text/SpellCheckingTextArea.java
Outdated
Show resolved
Hide resolved
# Conflicts: # CoreDataAccessView/src/au/gov/asd/tac/constellation/views/dataaccess/plugins/experimental/TestParametersPlugin.java # CoreDependencies/src/ivy.xml # CorePluginFramework/src/au/gov/asd/tac/constellation/plugins/gui/PasswordInputPane.java # CorePluginFramework/src/au/gov/asd/tac/constellation/plugins/gui/ValueInputPane.java # CorePreferences/src/au/gov/asd/tac/constellation/preferences/ApplicationOptionsPanel.form # CorePreferences/src/au/gov/asd/tac/constellation/preferences/ApplicationOptionsPanel.java # CorePreferences/src/au/gov/asd/tac/constellation/preferences/Bundle.properties # CoreWhatsNewView/src/au/gov/asd/tac/constellation/views/whatsnew/whatsnew.txt
# Conflicts: # CoreWhatsNewView/src/au/gov/asd/tac/constellation/views/whatsnew/whatsnew.txt
|
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.
Prerequisites
Reviewed the checklist
Reviewed feedback from the "Sonar Cloud" bot. Note that you have to wait
for the "CI / Unit Tests") to complete first. Failed Unit tests can be
debugged by adding the label "verbose logging" to the GitHub PR.
Description of the Change
Custom class loaders are now used to load Languagetool dependencies, to avoid indriya version conflicts.
languagetool requires indriya v1.3 or earlier while systems-common used by gt-opengis is not compatible with 1.3 and requires a later version. (v2.0.2 or latest v2.2) This caused #2054
All other approaches I've tried, like ivy configs, Maven Shade Plugin and Relocation, only works for build-time conflicts. In our scenario we need to isolate 2 versions of the same library at runtime. Using a Custom ClassLoader seems to be the only possibility.
I used ivy configs to isolate the languagetool libs into a separate folder, rather than listing all the transient dependencies of languagetool in the code. The latter could cause version conflicts, as Ivy might resolve to different versions than those we have hard-coded. On the other hand ivy configs duplicates the common transient libraries.
I am loading only the Languagetool dependencies separately, keeping the rest of the constellation intact, to avoid too much complications, and when the Languagetool developers fix their issue we can easily revert the changes. (Usually both versions of the dependency is loaded using custom class loaders)
Know issues:
Undo after Ignore all doesn't work (Pre-existed)
To Do:
Find a way to reuse the common transient libraries.
Alternate Designs
Why Should This Be In Core?
Enables spell checking in enabled text fields
Benefits
Possible Drawbacks
Complex coding
Verification Process
Applicable Issues
#870