From 8db2d8ea58787c1d26b09bc4f4b461f1f45ad955 Mon Sep 17 00:00:00 2001 From: mikrise2 Date: Mon, 22 Apr 2024 16:43:27 +0200 Subject: [PATCH] [ML4SE-627] Send files after pause button has been pressed. Changed pluginUntilBuild version. --- gradle.properties | 2 +- .../tasktracker/tracking/TaskFileHandler.kt | 8 + .../main/panel/panelStates/DefaultStates.kt | 1 + .../tasktracker/config/info_default.yaml | 8 +- .../config/task_content_default.yaml | 433 +++--------------- 5 files changed, 74 insertions(+), 378 deletions(-) diff --git a/gradle.properties b/gradle.properties index fc31768e..5ffa248d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ pluginVersion = 0.0.1 # Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html pluginSinceBuild = 223 -pluginUntilBuild = 233.* +pluginUntilBuild = 242 # IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension platformType = IC diff --git a/ij-plugin/src/main/kotlin/org/jetbrains/research/tasktracker/tracking/TaskFileHandler.kt b/ij-plugin/src/main/kotlin/org/jetbrains/research/tasktracker/tracking/TaskFileHandler.kt index 94609740..a259bd42 100644 --- a/ij-plugin/src/main/kotlin/org/jetbrains/research/tasktracker/tracking/TaskFileHandler.kt +++ b/ij-plugin/src/main/kotlin/org/jetbrains/research/tasktracker/tracking/TaskFileHandler.kt @@ -52,6 +52,14 @@ object TaskFileHandler { } } + fun disposeAllTasks() { + projectToTaskToFiles.forEach { (project, projectFiles) -> + projectFiles.keys.forEach { + disposeTask(project, it) + } + } + } + // TODO not forget to remove from document loggers hashmap, flush data fun disposeTask(project: Project, task: Task) { projectToTaskToFiles[project]?.let { diff --git a/ij-plugin/src/main/kotlin/org/jetbrains/research/tasktracker/ui/main/panel/panelStates/DefaultStates.kt b/ij-plugin/src/main/kotlin/org/jetbrains/research/tasktracker/ui/main/panel/panelStates/DefaultStates.kt index dadef18e..682b27f4 100644 --- a/ij-plugin/src/main/kotlin/org/jetbrains/research/tasktracker/ui/main/panel/panelStates/DefaultStates.kt +++ b/ij-plugin/src/main/kotlin/org/jetbrains/research/tasktracker/ui/main/panel/panelStates/DefaultStates.kt @@ -184,6 +184,7 @@ fun Panel.processScenario() { fun Panel.stopTracking() { TaskTrackerPlugin.mainConfig.scenarioConfig?.scenario?.reset() loadBasePage(LoadTemplate()) + TaskFileHandler.disposeAllTasks() ApplicationManager.getApplication().invokeLater { trackingService.stopTracking(::finalPage, ::serverErrorPage) } diff --git a/ij-plugin/src/main/resources/org/jetbrains/research/tasktracker/config/info_default.yaml b/ij-plugin/src/main/resources/org/jetbrains/research/tasktracker/config/info_default.yaml index fa8f30c3..d40833dc 100644 --- a/ij-plugin/src/main/resources/org/jetbrains/research/tasktracker/config/info_default.yaml +++ b/ij-plugin/src/main/resources/org/jetbrains/research/tasktracker/config/info_default.yaml @@ -1,8 +1,10 @@ -pluginName: "Kotlin Refactoring course" -pluginDescription: "We want to track your progress through the kotlin refactoring course in order to collect data on file changes during the course completion. Please, when you are ready, press the next button." -researchId: "Kotlin Refactoring" +pluginName: "Kotlin Introduction" +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: - "edu-assistant/eduAssistant.log" + - "edu-assistant/hintTiming.log" + - "edu-assistant/taskAnalysisTiming.log" type: "assistant" isInPluginDirectory: true \ No newline at end of file diff --git a/ij-plugin/src/main/resources/org/jetbrains/research/tasktracker/config/task_content_default.yaml b/ij-plugin/src/main/resources/org/jetbrains/research/tasktracker/config/task_content_default.yaml index 35ab8991..39f4574f 100644 --- a/ij-plugin/src/main/resources/org/jetbrains/research/tasktracker/config/task_content_default.yaml +++ b/ij-plugin/src/main/resources/org/jetbrains/research/tasktracker/config/task_content_default.yaml @@ -1,375 +1,60 @@ tasks: -- description: "Take the kotlin refactoring course, and after that, press the next button." - files: - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: ExtractingCode/WhatIsExtractVariableRefactoring/Theory/src/main/kotlin/jetbrains/refactoring/course/extracting - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: RenamingCode/NamingRules/Quiz/src/main/kotlin/jetbrains/refactoring/course/renaming - sourceSet: SRC - - extension: KOTLIN - filename: VideoSaver - isInternal: false - relativePath: RefactoringToDesignPatterns/FacadePatternPractice/task/src/main/kotlin/jetbrains/refactoring/course/patterns - sourceSet: SRC - - extension: KOTLIN - filename: PaymentProcessor - isInternal: false - relativePath: RefactoringToDesignPatterns/StrategyPatternPractice/task/src/main/kotlin/jetbrains/refactoring/course/patterns/processor - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: RefactoringAndItsPurpose/Introduction/RefactoringAndItsPurposeIntroduction/src/main/kotlin/jetbrains/refactoring/course/refactoring/purpose - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: RenamingCode/RenameRefactoringInIDE/RenameRefactoringInIDE/src/main/kotlin/jetbrains/refactoring/course/renaming - sourceSet: SRC - - extension: KOTLIN - filename: Task - isInternal: false - relativePath: ExtractingCode/WhatIsExtractVariableRefactoring/ExtractMagicConstantsPractice/src/main/kotlin/jetbrains/refactoring/course/extracting - sourceSet: SRC - - extension: KOTLIN - filename: Video - isInternal: false - relativePath: RefactoringToDesignPatterns/FacadePatternPractice/task/src/main/kotlin/jetbrains/refactoring/course/patterns/video - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: RefactoringAndItsPurpose/GettingFamiliarWithIDERefactoringFeatures/Theory/src/main/kotlin/jetbrains/refactoring/course/refactoring/purpose - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: MovingCode/Introduction/MovingCodeIntroduction/src/main/kotlin/jetbrains/refactoring/course/moving - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: RefactoringToDesignPatterns/FactoryMethodPatternTheory/Theory/src/main/kotlin/jetbrains/refactoring/course/patterns - sourceSet: SRC - - extension: KOTLIN - filename: ProcessedVideo - isInternal: false - relativePath: RefactoringToDesignPatterns/FacadePatternPractice/task/src/main/kotlin/jetbrains/refactoring/course/patterns/video - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: RefactoringAndItsPurpose/WhatIsCodeRefactoring/Quiz/src/main/kotlin/jetbrains/refactoring/course/refactoring/purpose - sourceSet: SRC - - extension: KOTLIN - filename: Animal - isInternal: false - relativePath: MovingCode/WhatArePullUpAndPushDownRefactorings/task/src/main/kotlin/jetbrains/refactoring/course/moving - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: MovingCode/WhatIsMoveMethodRefactoring/task/src/main/kotlin/jetbrains/refactoring/course/moving - sourceSet: SRC - - extension: KOTLIN - filename: Task - isInternal: false - relativePath: InliningCode/InlineMethodRefactoring/InlineMethodAndVariablesPractice/src/main/kotlin/jetbrains/refactoring/course/inlining - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: RefactoringAndItsPurpose/CommonCodeIssuesAndTheirImpactOnCodeQuality/Theory/src/main/kotlin/jetbrains/refactoring/course/refactoring/purpose - sourceSet: SRC - - extension: KOTLIN - filename: Student - isInternal: false - relativePath: RenamingCode/RenameRefactoringInIDE/FixTyposPractice/src/main/kotlin/jetbrains/refactoring/course/renaming - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: InliningCode/InlineMethodRefactoring/Theory/src/main/kotlin/jetbrains/refactoring/course/inlining - sourceSet: SRC - - extension: KOTLIN - filename: EncodedVideo - isInternal: false - relativePath: RefactoringToDesignPatterns/FacadePatternPractice/task/src/main/kotlin/jetbrains/refactoring/course/patterns/video - sourceSet: SRC - - extension: KOTLIN - filename: PayPalPayment - isInternal: false - relativePath: RefactoringToDesignPatterns/StrategyPatternPractice/task/src/main/kotlin/jetbrains/refactoring/course/patterns/strategy - sourceSet: SRC - - extension: KOTLIN - filename: Dog - isInternal: false - relativePath: MovingCode/WhatArePullUpAndPushDownRefactorings/task/src/main/kotlin/jetbrains/refactoring/course/moving - sourceSet: SRC - - extension: KOTLIN - filename: MiddleMan - isInternal: false - relativePath: InliningCode/MiddleManCodeSmell/task/src/main/kotlin/jetbrains/refactoring/course/inlining - sourceSet: SRC - - extension: KOTLIN - filename: TransportationServiceFactory - isInternal: false - relativePath: RefactoringToDesignPatterns/FactoryMethodPatternPractice/task/src/main/kotlin/jetbrains/refactoring/course/patterns - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: Introduction/Introduction/Introduction/src/main/kotlin/jetbrains/refactoring/course/introduction - sourceSet: SRC - - extension: KOTLIN - filename: Car - isInternal: false - relativePath: MovingCode/WhatIsMoveMethodRefactoring/task/src/main/kotlin/jetbrains/refactoring/course/moving/car - sourceSet: SRC - - extension: KOTLIN - filename: Bicycle - isInternal: false - relativePath: RefactoringToDesignPatterns/FactoryMethodPatternPractice/task/src/main/kotlin/jetbrains/refactoring/course/patterns - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: InliningCode/WhatIsInlineVariableRefactoring/Theory/src/main/kotlin/jetbrains/refactoring/course/inlining - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: RenamingCode/RenameRefactoringInIDE/Quiz/src/main/kotlin/jetbrains/refactoring/course/renaming - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: MovingCode/CohesionAndCoupling/Quiz/src - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: ExtractingCode/Introduction/ExtractingCodeIntroduction/src/main/kotlin/jetbrains/refactoring/course/extracting - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: RefactoringToDesignPatterns/Introduction/RefactoringToDesignPatternsIntroduction/src/main/kotlin/jetbrains/refactoring/course/patterns - sourceSet: SRC - - extension: KOTLIN - filename: Car - isInternal: false - relativePath: RefactoringToDesignPatterns/FactoryMethodPatternPractice/task/src/main/kotlin/jetbrains/refactoring/course/patterns - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: CodeStyleAndFormatting/WhatIsFormatting/Theory/src/main/kotlin/jetbrains/refactoring/course/formatting - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: CodeStyleAndFormatting/WhatIsFormatting/Quiz/src/main/kotlin/jetbrains/refactoring/course/formatting - sourceSet: SRC - - extension: KOTLIN - filename: Order - isInternal: false - relativePath: RefactoringToDesignPatterns/StrategyPatternPractice/task/src/main/kotlin/jetbrains/refactoring/course/patterns - sourceSet: SRC - - extension: KOTLIN - filename: University - isInternal: false - relativePath: RenamingCode/RenameRefactoringInIDE/FixTyposPractice/src/main/kotlin/jetbrains/refactoring/course/renaming - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: RefactoringToDesignPatterns/FacadePatternTheory/Theory/src/main/kotlin/jetbrains/refactoring/course/patterns - sourceSet: SRC - - extension: KOTLIN - filename: Transport - isInternal: false - relativePath: RefactoringToDesignPatterns/FactoryMethodPatternPractice/task/src/main/kotlin/jetbrains/refactoring/course/patterns - sourceSet: SRC - - extension: KOTLIN - filename: Task - isInternal: false - relativePath: InliningCode/WhatIsInlineVariableRefactoring/InlineVariablesPractice/src/main/kotlin/jetbrains/refactoring/course/inlining - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: Conclusion/FeedbackSurvey/FeedbackSurvey/src/main/kotlin/jetbrains/refactoring/course/conclusion - sourceSet: SRC - - extension: KOTLIN - filename: Task - isInternal: false - relativePath: CodeStyleAndFormatting/WhatIsFormatting/ReformatTheCodePractice/src/main/kotlin/jetbrains/refactoring/course/formatting - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: RenamingCode/Introduction/RenamingCodeIntroduction/src/main/kotlin/jetbrains/refactoring/course/renaming - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: MovingCode/CohesionAndCoupling/Theory/src - sourceSet: SRC - - extension: KOTLIN - filename: Task - isInternal: false - relativePath: CodeStyleAndFormatting/CodeSchemasAndEditorConfig/task/src/main/kotlin/jetbrains/refactoring/course/formatting - sourceSet: SRC - - extension: KOTLIN - filename: Driver - isInternal: false - relativePath: MovingCode/WhatIsMoveMethodRefactoring/task/src/main/kotlin/jetbrains/refactoring/course/moving/driver - sourceSet: SRC - - extension: KOTLIN - filename: Task - isInternal: false - relativePath: ExtractingCode/WhatIsExtractMethodRefactoring/ExtractDuplicatedCodePractice/src/main/kotlin/jetbrains/refactoring/course/extracting - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: RefactoringAndItsPurpose/CommonCodeIssuesAndTheirImpactOnCodeQuality/Quiz/src/main/kotlin/jetbrains/refactoring/course/refactoring/purpose - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: RefactoringToDesignPatterns/FacadePatternPractice/task/src/main/kotlin/jetbrains/refactoring/course/patterns - sourceSet: SRC - - extension: KOTLIN - filename: PaymentStrategy - isInternal: false - relativePath: RefactoringToDesignPatterns/StrategyPatternPractice/task/src/main/kotlin/jetbrains/refactoring/course/patterns/strategy - sourceSet: SRC - - extension: KOTLIN - filename: CreditCardPayment - isInternal: false - relativePath: RefactoringToDesignPatterns/StrategyPatternPractice/task/src/main/kotlin/jetbrains/refactoring/course/patterns/strategy - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: RenamingCode/NamingRules/Theory/src/main/kotlin/jetbrains/refactoring/course/renaming - sourceSet: SRC - - extension: NO_EXTENSION - filename: .editorconfig - isInternal: false - relativePath: CodeStyleAndFormatting/CodeSchemasAndEditorConfig/task - sourceSet: SRC - - extension: KOTLIN - filename: Task - isInternal: false - relativePath: RefactoringAndItsPurpose/Practice/RefactoringAndItsPurposePractice/src/main/kotlin/jetbrains/refactoring/course/refactoring/purpose - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: Introduction/JoinOurDiscordCommunity/JoinOurDiscordCommunity/src/main/kotlin/jetbrains/refactoring/course/introduction - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: RefactoringToDesignPatterns/DesignPatternsAndTheirRelationshipsWithRefactoring/Theory/src/main/kotlin/jetbrains/refactoring/course/patterns - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: RefactoringToDesignPatterns/StrategyPatternTheory/Theory/src/main/kotlin/jetbrains/refactoring/course/patterns - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: RefactoringToDesignPatterns/StrategyPatternPractice/task/src/main/kotlin/jetbrains/refactoring/course/patterns - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: Introduction/GettingToKnowYou/GettingToKnowYou/src/main/kotlin/jetbrains/refactoring/course/introduction - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: RefactoringToDesignPatterns/FactoryMethodPatternPractice/task/src/main/kotlin/jetbrains/refactoring/course/patterns - sourceSet: SRC - - extension: KOTLIN - filename: Task - isInternal: false - relativePath: CodeStyleAndFormatting/WhatIsFormatting/ReformatTheCodeUsingIDEPractice/src/main/kotlin/jetbrains/refactoring/course/formatting - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: Conclusion/Conclusion/Conclusion/src/main/kotlin/jetbrains/refactoring/course/conclusion - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: CodeStyleAndFormatting/Introduction/CodeStyleAndFormattingIntroduction/src/main/kotlin/jetbrains/refactoring/course/formatting - sourceSet: SRC - - extension: KOTLIN - filename: VideoLoader - isInternal: false - relativePath: RefactoringToDesignPatterns/FacadePatternPractice/task/src/main/kotlin/jetbrains/refactoring/course/patterns - sourceSet: SRC - - extension: KOTLIN - filename: VideoEncoder - isInternal: false - relativePath: RefactoringToDesignPatterns/FacadePatternPractice/task/src/main/kotlin/jetbrains/refactoring/course/patterns - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: RefactoringAndItsPurpose/RefactoringTechniques/Theory/src/main/kotlin/jetbrains/refactoring/course/refactoring/purpose - sourceSet: SRC - - extension: KOTLIN - filename: VideoProcessor - isInternal: false - relativePath: RefactoringToDesignPatterns/FacadePatternPractice/task/src/main/kotlin/jetbrains/refactoring/course/patterns - sourceSet: SRC - - extension: KOTLIN - filename: VideoConversionFacade - isInternal: false - relativePath: RefactoringToDesignPatterns/FacadePatternPractice/task/src/main/kotlin/jetbrains/refactoring/course/patterns - sourceSet: SRC - - extension: KOTLIN - filename: Cat - isInternal: false - relativePath: MovingCode/WhatArePullUpAndPushDownRefactorings/task/src/main/kotlin/jetbrains/refactoring/course/moving - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: ExtractingCode/WhatIsExtractMethodRefactoring/Theory/src/main/kotlin/jetbrains/refactoring/course/extracting - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: RefactoringAndItsPurpose/WhatIsCodeRefactoring/Theory/src/main/kotlin/jetbrains/refactoring/course/refactoring/purpose - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: RefactoringAndItsPurpose/RefactoringTechniques/Quiz/src/main/kotlin/jetbrains/refactoring/course/refactoring/purpose - sourceSet: SRC - - extension: KOTLIN - filename: Main - isInternal: false - relativePath: InliningCode/Introduction/InliningCodeIntroduction/src/main/kotlin/jetbrains/refactoring/course/inlining - sourceSet: SRC - - extension: KOTLIN - filename: BitcoinPayment - isInternal: false - relativePath: RefactoringToDesignPatterns/StrategyPatternPractice/task/src/main/kotlin/jetbrains/refactoring/course/patterns/strategy - sourceSet: SRC - id: main - name: "Kotlin refactoring course" + - description: "Take the kotlin introduction course, and after that, press the next button." + files: + - extension: KOTLIN + filename: Main + isInternal: false + relativePath: TheFirstDateWithProgramming/task/src/main/kotlin/jetbrains/kotlin/course/first/date + sourceSet: SRC + - extension: KOTLIN + filename: Main + isInternal: false + relativePath: WarmUp/task/src/main/kotlin/jetbrains/kotlin/course/warmup + sourceSet: SRC + - extension: KOTLIN + filename: Main + isInternal: false + relativePath: LastPush/task/src/main/kotlin/jetbrains/kotlin/course/last/push + sourceSet: SRC + - extension: KOTLIN + filename: Main + isInternal: false + relativePath: MastermindAdvanced/task/src/main/kotlin/jetbrains/kotlin/course/mastermind/advanced + sourceSet: SRC + - extension: KOTLIN + filename: RealQuestions + isInternal: false + relativePath: TheFirstDateWithProgramming/task/src/main/kotlin/jetbrains/kotlin/course/first/date + sourceSet: SRC + - extension: KOTLIN + filename: Main + isInternal: false + relativePath: AlmostDone/task/src/main/kotlin/jetbrains/kotlin/course/almost/done + sourceSet: SRC + - extension: KOTLIN + filename: Main + isInternal: false + relativePath: Hangman/task/src/main/kotlin/jetbrains/kotlin/course/hangman + sourceSet: SRC + - extension: KOTLIN + filename: Main + isInternal: false + relativePath: FeedbackSurvey/Survey/src + sourceSet: SRC + - extension: KOTLIN + filename: Main + isInternal: false + relativePath: Introduction/task/src/main/kotlin/jetbrains/kotlin/course/welcome + sourceSet: SRC + - extension: KOTLIN + filename: Main + isInternal: false + relativePath: Chat/task/src/main/kotlin/jetbrains/kotlin/course/chat + sourceSet: SRC + - extension: KOTLIN + filename: Util + isInternal: false + relativePath: WarmUp/task/src/main/kotlin/jetbrains/kotlin/course/warmup + sourceSet: SRC + id: main + name: "Kotlin Introduction" \ No newline at end of file