Skip to content

Commit

Permalink
[ML4SE-343] Changed plugin description. Added possibility to send fil…
Browse files Browse the repository at this point in the history
…es from the plugin directory.
  • Loading branch information
mikrise2 committed Feb 4, 2024
1 parent 2d831ac commit 547f117
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ import kotlinx.serialization.Serializable
* @param type The log type. By default, it is set to "default".
*/
@Serializable
data class Log(val logPaths: List<String>, val type: String = "default")
data class Log(val logPaths: List<String>, val isInPluginDirectory: Boolean = false, val type: String = "default")
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
package org.jetbrains.research.tasktracker.tracking

import com.intellij.openapi.application.PathManager
import org.jetbrains.research.tasktracker.config.content.Log
import java.io.File
import java.nio.file.Path
import kotlin.io.path.Path

class ExternalLogger(private val root: Path, private val log: Log) : Loggable() {
class ExternalLogger(private val projectRoot: Path, private val log: Log) : Loggable() {
override val logFileType: String = log.type

override fun getLogFiles(): List<File> = log.logPaths.map {
val root: Path = if (log.isInPluginDirectory) {
Path(PathManager.getPluginsPath())
} else {
projectRoot
}
root.resolve(it).toFile()
}.filter { it.exists() }
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
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"
pluginDescription: "We want to track your progress through the kotlin introduction course in order to collect data on file changes during the course completion. Please, when you are ready, press the next button."
researchId: "Kotlin Introduction"
logs:
- logPaths:
- "eduAssistant.log"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tasks:
- description: description
- description: "Take the kotlin introduction course, and after that, press the next button."
files:
- extension: KOTLIN
filename: Main
Expand Down Expand Up @@ -57,4 +57,4 @@ tasks:
relativePath: WarmUp/task/src/main/kotlin/jetbrains/kotlin/course/warmup
sourceSet: SRC
id: main
name: example
name: "Kotlin Introduction"

0 comments on commit 547f117

Please sign in to comment.