Skip to content

Commit

Permalink
[ML4SE-38] Fixed README, added properties (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikrise2 authored May 10, 2024
1 parent 0c6b94e commit 73ae87c
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 23 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
.idea
.qodana
build

ij-plugin/src/main/resources/properties/actual
24 changes: 13 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,19 @@ code quality and other. This will allow us to conduct better studies, produce mo
ux-studies and potentially speed up user-testing for experimental features.


We want to develop a plugin with the following functionality:

- [ ] It will be able to ask small, singular, questions to user in popup window;
- [ ] It will be able to suggest users to participate in two types of studies:
- [ ] “Questionnaire” study – which will open questionnaire in side window of IDE& Questionnaire
in this case could be any web content, for example diary record or some attention experiment.
- [ ] “Task” study – which will open file inside ide with some task and will record the process of task solution
- [ ]“Replay” study – which will play a given set of actions in the IDE and users will be asked a few questions about it.
- [ ] It will be able to configure IDE in arbitrary pre-defined way;
- [ ] It will be able to suggest this task based on IDE logs – on given time or after a particular event.
- [ ] Send all resulting data to the remote server.

The plugin is capable of collecting the following data:
- Snapshots of all code changes.
- All activities that occurred in the IDE. More details about activity types you can find [here](ij-plugin/src/main/kotlin/org/jetbrains/research/tasktracker/tracking/activity/ActivityEvent.kt).
- Switching between file windows.
- Switching between tool and IDE plugin windows.
- Survey responses.
- Third-party logs/files specified in the [configuration](ij-plugin/src/main/kotlin/org/jetbrains/research/tasktracker/config/content/PluginInfoConfig.kt) by this [structure](ij-plugin/src/main/kotlin/org/jetbrains/research/tasktracker/config/content/Log.kt).


The plugin works in conjunction with the [server](ij-server), which is located in the same repository. The server receives, processes, and saves the data that was sent from the plugin side.

The settings of the plugin configuration and interaction with its server are stored [here](ij-plugin/src/main/resources/properties/actual). If this directory does not exist, it will be created with default properties and values.

Here we want to notice that the plugin will not collect any of the user data outside given tasks.

Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# IntelliJ Platform Artifacts Repositories -> https://plugins.jetbrains.com/docs/intellij/intellij-artifacts.html

pluginGroup = org.jetBrains.research.tasktracker
pluginName = tasktracker-3
pluginName = TaskTracker-3
pluginRepositoryUrl = https://github.com/JetBrains-Research/tasktracker-3
# SemVer format -> https://semver.org
pluginVersion = 0.0.1
pluginVersion = 0.1.0

# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild = 223
Expand Down
36 changes: 27 additions & 9 deletions ij-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import io.gitlab.arturbosch.detekt.Detekt
import org.jetbrains.changelog.markdownToHTML
import org.jetbrains.kotlin.incremental.createDirectory

group = rootProject.group
version = rootProject.version
Expand Down Expand Up @@ -35,21 +36,38 @@ intellij {
plugins.set(properties("platformPlugins").map { it.split(',').map(String::trim).filter(String::isNotEmpty) })
}

val defaultPropertiesDirectory = project.file("src/main/resources/properties/default")
val actualPropertiesDirectory = project.file("src/main/resources/properties/actual").also { if (!it.exists()) it.createDirectory() }

tasks {
val checkPropertiesExist = register("checkPropertiesExist") {
doLast {
defaultPropertiesDirectory.listFiles()?.forEach { file ->
val newFile = File("${actualPropertiesDirectory.absolutePath}/${file.name}")
if (!newFile.exists()) {
newFile.createNewFile()
newFile.writeText(file.readText())
}
}
}
}

configureEach {
if (name != checkPropertiesExist.name) {
dependsOn(checkPropertiesExist)
}
}

withType<org.jetbrains.intellij.tasks.BuildSearchableOptionsTask>()
.forEach { it.enabled = false }

patchPluginXml {
val description = """
CodeMood – the revolutionary plugin that understands and affirms your emotions while you code!
The plugin will ask you permission to record the coding session using one of available video devices.
_We don't send the photos to a server and handle them locally._
During the session, you can click on the plugin icon to pop up a dashboard with
an emoticon reflecting the programmer's current emotion.
In the end of the coding session you might fill out a short survey about your feelings.
**Download CodeMood today and start coding with emotions in harmony.**
TaskTracker-3 - a revolutionary plugin for collecting detailed data during education.
The plugin collects various user activities during interactions with it, such as code
snapshots with a certain granularity, all interactions with the interface, shortcuts,
and so on. Extensive configuration options with config files that control its entire
functionality make it very lightweight and easy to set up and use.
""".trimIndent()
pluginDescription.set(description.run { markdownToHTML(this) })

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import org.jetbrains.research.tasktracker.config.tracking.WebCamTrackingConfig
import org.jetbrains.research.tasktracker.config.util.buildBaseConfig
import org.jetbrains.research.tasktracker.properties.PluginProperties
import java.io.File
import java.util.*

/**
* Plugin's main config. Initializes and stores configs of all subsystems.
Expand Down Expand Up @@ -60,7 +61,8 @@ data class MainTaskTrackerConfig(
val agreementFilePath = "$pluginFolderPath/agreement/agreement.json"
val logFilesFolder = "$pluginFolderPath/logs"
const val PLUGIN_PROPERTIES_FILE = "$PLUGIN_NAME.properties"
private const val DOMAIN = "https://tt-server-5.labs.jb.gg"
private val DOMAIN = ResourceBundle.getBundle("properties.actual.domain")
.getString("serverAddress")

fun getRoute(path: String) = "$DOMAIN/$path"

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
serverAddress=http://0.0.0.0:8080

0 comments on commit 73ae87c

Please sign in to comment.