-
Notifications
You must be signed in to change notification settings - Fork 0
017 02 08 2021 to 02 12 2021
-
Fix matrix logic ✔️
-
Add testing for undo/replay refactoring operations ⏳
-
Fix RefMerge/Undo/Replay code ✔️
-
Find solution for rename class prompt issue ⏳
-
Use GitHub actions
I thought about the first override logic check and thought up a few override cases. The first override check should not happen and I removed it. While thinking about this I thought of another possible overload check for inherited classes that I want to talk to Sarah about.
-
I have started thinking about test cases for undo/replay/refMerge and I need to figure out how to write a test case that for a method that uses a project instance and PSI classes. I ran into a problem when implementing the test design for the logic matrix because I could not create a mock PSI class without a project instance and I could not find a way to get that instance in the test. I worked around it by using UML classes from RefMiner but I will not be able to do the same thing in this case. I am going to need to find a way to do this for testing.
-
I created a test for UndoOperations that tests if undoRenameMethod properly undoes the refactoring. I need to add a couple more tests to make sure the whole method works properly but that just requires me finding edge cases. Right now, each test requires an original, refactored, and result file and I'm trying to think of a better way to structure it. I can reduce the number of files by comparing the text alone but I think that might cause issues down the road. The files can be reused for replaying the refactoring operation and I think a lot of the code can be reused in several tests so I need to consider that as well.
-
I have a test for undo/replay rename method and undo/replay rename class. The class preview prompt does not appear for the testing which gives me further confidence that we can disable it. All of the methods work properly. I am planning to add more in-depth testing for each of the methods as well as for the RefMerge code. I am using a lot of test files for the tests and I feel like there is a better way to do this but I am not sure what it is yet. I also feel like I could have better code reuse but I'm not sure how to implement it yet.
-
I added tests for undoing and replaying a list of detected refactorings using RefMerge.undoRefactorings and RefMerge.replayRefactorings. I also test some Utils functionality. I do not know how I am going to test the parts of RefMerge that need to checkout commits.
-
I have started cleaning up the code in the undoOperations class. I've been testing pieces that I change as I go and I think there might still be an issue with saving the content. I need to look more into this but I am going to look into it after I clean up the code more.
-
I cleaned the code up and it's much more readable and there is more reuse. There is definitely a problem and I'm pretty sure that something isn't being waited for. I created an issue for it with more details. I'm pretty sure that the issue is in the GitUtils. I think it's being run asynchronously and I need to wait for it to finish.
-
The issue isn't a timing issue. The PSI class was not getting updated even though the disk and virtual file system both updated. I believe I finally fixed the issue but I want to be 100% certain. Another problem I noticed is that we only use the method name to find the PSI method to be refactored. If we have two methods with the same name, this might cause an issue. I want to also use the signature, however I'm not sure if I can get the signature from RefMiner. I think I can get it as a string but I need to check. I can get the signature from the PSI method as a methodsignature type, but I need a substitutor and I'm not sure how to get that. Regardless, this is significant progress.
-
I fixed the issue. I reparse the files after the left and right commits are checked out, which updates the PSI classes. I do not need to do this after checking out the base commit or undoing refactoring operations because I save those changes to disk and save them in the temp directory. I tried rerunning it several times to be absolutely certain and the output in the temp directory and the output after replaying the refactoring operations is correct. I also undid all of the changes to the file in the plugin and each refactoring was replayed and undone in the correct order.
-
Originally I was using the class name and method name to check for the correct method. I tried comparing the method signatures but I cannot actually compare the UML method signature used by RefMiner and the PSI method signature. Instead, I use the class name, the return type, the method name, and the list of parameters which should be enough.
-
If I cannot find the class because the project cannot be built, I now check both classes and inner classes for the PSI class. I also added a method for replaying the class rename.
-
I was debugging the issue with saving content/GitUtils and I stepped through the rename processor in more depth. I stumbled across a few lines of code that are used to bring up the class rename prompt. They use a boolean to check if there's a preview, and if there is it brings up the prompt. I'm not sure if we can override the method that returns it or if there's another work around, but this is worth investigating further.
-
The prompt does not appear in testing. This either means there is a way to turn it off for testing, or I am doing something wrong with the real examples. I need to investigate this further but I feel hopeful that the fix is not too complicated.
I will work on finishing this after I resolve the above tasks.
-
IntelliJ class refactoring prompt
-
Find a way to use Git merge with IntelliJ API
-
We discussed how to test the parts that use the IntelliJ Git API. We agreed that the best way is to programmatically create a fake git history and use commits in it. I will draw what I want in the history so I have a better idea what I need to program.
-
We discussed adding a new overload check that checks if a method overloads another in a class that it inherits. We agreed that I need to do this in a way that is general so we can check the whole hierarchy.
-
RefactoringMiner detected a rename method that is probably wrong. I need to open an issue on our repository so we can remember it and add to it if we find more occurrences. I need to open an issue on their repository so they can resolve the bug.
-
Grammar-kit was updated to produce the light-psi-all.jar. Making the plugin a standalone project should only require minor changes so we will continue working on the plugin and look more into the light-psi-all.jar once RefMerge is more developed. Waiting will also give them time to come up with a less hacky solution.
-
We talked about what to do if we find two refactoring operations that conflict in the matrix. I will think more about what to report to the user and what user actions will be available. We agreed that in the evaluation, we will report the number of times a conflict is reported and choose an option to automatically use each time a conflict is reported.
-
Resolve the class refactoring prompt issue
-
Resolve Git merge issue
-
Update multiple level inheritance check
-
Create a fake Git history and create tests for the Git API
-
Think about the refactoring ordering and infrastructure
-
Think about what to do when refactoring operations conflict