-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
798 additions
and
13 deletions.
There are no files selected for viewing
337 changes: 337 additions & 0 deletions
337
src/main/java/org/codetracker/CommentTrackerChangeHistory.java
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
package org.codetracker.api; | ||
|
||
import org.codetracker.CommentTrackerImpl; | ||
import org.codetracker.element.Comment; | ||
import org.eclipse.jgit.lib.Repository; | ||
|
||
import gr.uom.java.xmi.LocationInfo.CodeElementType; | ||
|
||
public interface CommentTracker extends CodeTracker { | ||
default History.HistoryInfo<Comment> blame() throws Exception{ | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
class Builder { | ||
private Repository repository; | ||
private String gitURL; | ||
private String startCommitId; | ||
private String filePath; | ||
private String methodName; | ||
private int methodDeclarationLineNumber; | ||
private CodeElementType codeElementType; | ||
private int commentStartLineNumber; | ||
private int commentEndLineNumber; | ||
|
||
public Builder repository(Repository repository) { | ||
this.repository = repository; | ||
return this; | ||
} | ||
|
||
public Builder gitURL(String gitURL) { | ||
this.gitURL = gitURL; | ||
return this; | ||
} | ||
|
||
public Builder startCommitId(String startCommitId) { | ||
this.startCommitId = startCommitId; | ||
return this; | ||
} | ||
|
||
public Builder filePath(String filePath) { | ||
this.filePath = filePath; | ||
return this; | ||
} | ||
|
||
public Builder methodName(String methodName) { | ||
this.methodName = methodName; | ||
return this; | ||
} | ||
|
||
public Builder methodDeclarationLineNumber(int methodDeclarationLineNumber) { | ||
this.methodDeclarationLineNumber = methodDeclarationLineNumber; | ||
return this; | ||
} | ||
|
||
public Builder codeElementType(CodeElementType codeElementType) { | ||
this.codeElementType = codeElementType; | ||
return this; | ||
} | ||
|
||
public Builder commentStartLineNumber(int commentStartLineNumber) { | ||
this.commentStartLineNumber = commentStartLineNumber; | ||
return this; | ||
} | ||
|
||
public Builder commentEndLineNumber(int commentEndLineNumber) { | ||
this.commentEndLineNumber = commentEndLineNumber; | ||
return this; | ||
} | ||
|
||
private void checkInput() { | ||
|
||
} | ||
|
||
public CommentTracker build() { | ||
checkInput(); | ||
return new CommentTrackerImpl(repository, startCommitId, filePath, methodName, methodDeclarationLineNumber, | ||
codeElementType, commentStartLineNumber, commentEndLineNumber); | ||
} | ||
} | ||
} |
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