You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the previous version of this project, we relied on a new plugin window that details all merge conflict changes. For this new proposed design, we want to utilize IntelliJ's three-way diff to display these explanations. When viewing the diff while in the merge conflict state, hovering over a conflict region (whether it be in base, OURS, or THEIRS) with our cursor, a pop-up would appear containing pertinent information regarding the merge conflict.
Relevant information
A pop-up window would contain the following:
OURS changes that contribute to the conflict
THEIRS changes that contribute to the conflict
For each change, a link that opens and jumps to the relevant revision number in the IntelliJ git log
Draft design
Open image in new tab for better quality. Current merge conflict in image is after attempting to merge 113d77e5fa711cfcdc50953b70a7df6803a467d8 and 4f62da869d31c7d72144d50ee436378f302b0d45 for Android-Terminal-Emulator:
Planned setup
RefactoringMiner
We will need RefactoringMiner to obtain all refactorings throughout the series of commits (from the common ancestor to a merge parent).
Sample output from RefactoringMiner 2.0 for commit 1327b4c3152331e8e376b112c5827072823de7a5 from Android-Terminal-Emulator:
The following information from RefactoringMiner will be useful:
filepath
startLine
endLine
From the screenshot above, the THEIRS change Moved private class ModifierKey from class TermKeyListener in EmulatorView.java to ModifierKey in EmulatorView.java would be collected by using RefactoringMiner.
RefactoringMiner also allows us to detect all refactorings within a commit range, which we can use to detecting between a common ancestor and a merge parent.
GumTree (or CLDiff)
GumTree and CLDiff are differencing algorithms that we can use to distinguish changes semantically and syntactically (rather than relying on textual diffs alone). This can help with breaking down our explanations.
Consider the following example:
GumTree
This is how GumTree's edit scripts would look like for the method foo(), which is relevant to THEIRS change Moved method public static void foo() from Foo.java to FooHelper.java:
delete-tree
---
MethodDeclaration [24,144]
Modifier: public [24,30]
Modifier: static [31,37]
PrimitiveType: void [38,42]
SimpleName: foo [43,46]
Block [49,144]
VariableDeclarationStatement [59,74]
PrimitiveType: int [59,62]
VariableDeclarationFragment [63,73]
SimpleName: x [63,64]
MethodInvocation [67,73]
SimpleName: getX [67,71]
ExpressionStatement [83,90]
Assignment [83,89]
SimpleName: x [83,84]
ASSIGNEMENT_OPERATOR: += [85,87]
NumberLiteral: 2 [88,89]
VariableDeclarationStatement [99,114]
PrimitiveType: int [99,102]
VariableDeclarationFragment [103,113]
SimpleName: y [103,104]
MethodInvocation [107,113]
SimpleName: getY [107,111]
ExpressionStatement [123,138]
MethodInvocation [123,137]
SimpleName: calcDist [123,131]
METHOD_INVOCATION_ARGUMENTS [132,136]
SimpleName: x [132,133]
SimpleName: y [135,136]
CLDiff
This is how CLDiff's edit scripts would look like for the same change:
We would have to use IntelliJ's git dependency git4idea for any git functionality, such as parsing through the commit history and the diffs for conflict regions. How we do this requires more investigation. For reference...
The text was updated successfully, but these errors were encountered:
Description
In the previous version of this project, we relied on a new plugin window that details all merge conflict changes. For this new proposed design, we want to utilize IntelliJ's three-way diff to display these explanations. When viewing the diff while in the merge conflict state, hovering over a conflict region (whether it be in base, OURS, or THEIRS) with our cursor, a pop-up would appear containing pertinent information regarding the merge conflict.
Relevant information
A pop-up window would contain the following:
Draft design
Open image in new tab for better quality. Current merge conflict in image is after attempting to merge
113d77e5fa711cfcdc50953b70a7df6803a467d8
and4f62da869d31c7d72144d50ee436378f302b0d45
for Android-Terminal-Emulator:Planned setup
RefactoringMiner
We will need RefactoringMiner to obtain all refactorings throughout the series of commits (from the common ancestor to a merge parent).
Sample output from RefactoringMiner 2.0 for commit
1327b4c3152331e8e376b112c5827072823de7a5
from Android-Terminal-Emulator:The following information from RefactoringMiner will be useful:
From the screenshot above, the THEIRS change
Moved private class ModifierKey from class TermKeyListener in EmulatorView.java to ModifierKey in EmulatorView.java
would be collected by using RefactoringMiner.RefactoringMiner also allows us to detect all refactorings within a commit range, which we can use to detecting between a common ancestor and a merge parent.
GumTree (or CLDiff)
GumTree and CLDiff are differencing algorithms that we can use to distinguish changes semantically and syntactically (rather than relying on textual diffs alone). This can help with breaking down our explanations.
Consider the following example:
GumTree
This is how GumTree's edit scripts would look like for the method
foo()
, which is relevant to THEIRS changeMoved method public static void foo() from Foo.java to FooHelper.java
:CLDiff
This is how CLDiff's edit scripts would look like for the same change:
git4idea
We would have to use IntelliJ's git dependency git4idea for any git functionality, such as parsing through the commit history and the diffs for conflict regions. How we do this requires more investigation. For reference...
The text was updated successfully, but these errors were encountered: