generated from JetBrains/intellij-platform-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ML4SE-342] External logs support. (#96)
- Loading branch information
Showing
5 changed files
with
50 additions
and
2 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
ij-plugin/src/main/kotlin/org/jetbrains/research/tasktracker/config/content/Log.kt
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,12 @@ | ||
package org.jetbrains.research.tasktracker.config.content | ||
|
||
import kotlinx.serialization.Serializable | ||
|
||
/** | ||
* Represents a log with associated log paths and a log type. | ||
* | ||
* @param logPaths The list of relative log paths from the project root. | ||
* @param type The log type. By default, it is set to "default". | ||
*/ | ||
@Serializable | ||
data class Log(val logPaths: List<String>, val type: String = "default") |
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
13 changes: 13 additions & 0 deletions
13
ij-plugin/src/main/kotlin/org/jetbrains/research/tasktracker/tracking/ExternalLogger.kt
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,13 @@ | ||
package org.jetbrains.research.tasktracker.tracking | ||
|
||
import org.jetbrains.research.tasktracker.config.content.Log | ||
import java.io.File | ||
import java.nio.file.Path | ||
|
||
class ExternalLogger(private val root: Path, private val log: Log) : Loggable() { | ||
override val logFileType: String = log.type | ||
|
||
override fun getLogFiles(): List<File> = log.logPaths.map { | ||
root.resolve(it).toFile() | ||
}.filter { it.exists() } | ||
} |
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
6 changes: 5 additions & 1 deletion
6
ij-plugin/src/main/resources/org/jetbrains/research/tasktracker/config/info_default.yaml
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 |
---|---|---|
@@ -1,3 +1,7 @@ | ||
pluginName: Refactoring course | ||
pluginDescription: "We want to track your progress through the code refactoring course in order to collect data on file changes during the course completion. Please, when you are ready, press the next button." | ||
researchId: "RefactoringCourse" | ||
researchId: "RefactoringCourse" | ||
logs: | ||
- logPaths: | ||
- "eduAssistant.log" | ||
type: "ai" |