Repository navigation
Map Of Countries 1.5.2: use the model of the graph being laid out - #372
Merged
Merged
Conversation
ShapeFileReader looked up the current workspace's graph model through the GraphController instead of using the graph it was given, so the layout threw a NullPointerException when run on a graph that is not in the current workspace (a script, a test). Use the model of the given graph. Version 1.5.2. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
Found by the SPI contract tests of gephi-plugins-tests (
LayoutContractTest), run against Gephi 0.11.4.ShapeFileReader.read(Graph gr, ...)ignored the graph it was given: it looked up theGraphControllerand took the current workspace's graph model, then used its factory to create the map nodes. When the layout runs on a graph that is not in the current workspace (a script, a test), that model isnullandGeoLayout.goAlgo()throwsNullPointerException: ... "gm" is null. It now usesgr.getModel(), the model of the graph being laid out. In the user interface this is the same model, so behavior there doesn't change. Removed the two imports that became unused. Version 1.5.1 → 1.5.2.Verified: the contract tests (gephi-plugins-tests 1.1.1) now run the layout on every graph. The only finding left is that the layout adds the map's nodes and edges, which is by design and becomes a warning in the next gephi-plugins-tests release. Short-lived branch off
master-forge, 2 files.