-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #64: Track doc changes (Ydocchange)
- Add a new change type Ydocchange which extends Ysignaturechange - Rename everywhere reference of *javaDoc* -> Doc to keep things consistent with python and typescript implementation TODO list: - Implement `getInitialDoc` in `com/felixgrund/codeshovel/parser/impl/PythonFunction.java` - Implement `getInitialDoc` in `com/felixgrund/codeshovel/parser/impl/TypeScriptFunction.java` - Handle `Ydocchange` in `src/main/java/com/felixgrund/codeshovel/parser/impl/TypeScriptParser.java` - Handle `Ydocchange` in `src/main/java/com/felixgrund/codeshovel/parser/impl/PythonParser.java` - Get the diff for doc changes
- Loading branch information
1 parent
3ce998e
commit 0d642eb
Showing
15 changed files
with
59 additions
and
21 deletions.
There are no files selected for viewing
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
21 changes: 21 additions & 0 deletions
21
src/main/java/com/felixgrund/codeshovel/changes/Ydocchange.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.felixgrund.codeshovel.changes; | ||
|
||
import com.felixgrund.codeshovel.parser.Yfunction; | ||
import com.felixgrund.codeshovel.wrappers.StartEnvironment; | ||
|
||
public class Ydocchange extends Ysignaturechange{ | ||
|
||
public Ydocchange(StartEnvironment startEnv, Yfunction newFunction, Yfunction oldFunction) { | ||
super(startEnv, newFunction, oldFunction); | ||
} | ||
|
||
@Override | ||
protected Object getOldValue() { | ||
return oldFunction.getFunctionDoc(); | ||
} | ||
|
||
@Override | ||
protected Object getNewValue() { | ||
return newFunction.getFunctionDoc(); | ||
} | ||
} |
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
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
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
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
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
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
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
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
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
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
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
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
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