-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Welcome to the RM-ASTDiff wiki!
You can run this tool as below:
ProjectASTDiff projectASTDiff = ProjectASTDiffer.fromURL(url).diff();
ProjectASTDiff projectASTDiff = ProjectASTDiffer.fromLocalRepo(localDir,commitID).diff();
ProjectASTDiff projectASTDiff = ProjectASTDiffer.fromLocalDirectories(dir1 , dir2) .diff()
ProjectASTDiff projectASTDiff = ProjectASTDiffer.fromLocalFiles("file1.java" , "file2.java").diff();
ProjectASTDiff is the object type that we use to store the result of the diff execution.
If you are using this tool on the file-level, you can access the mappings with the following command:
MultiMappingStore mappings = projectASTDiff.getAstDiffMap().values().iterator().next().getMappings();
In general, ASTDiff list is accessible via projectASTDiff.getAstDiffMap()
which is a Map from DiffInfo
to ASTDiff
. DiffInfo stores additional information such as file names for the parent and child versions to enhance the visualization.
You can execute the GUI (webdiff) on the projectASTDiff:
WebDiff webDiff = new WebDiff(projectASTDiff);
webDiff.run();