Skip to content

Commit

Permalink
merging
Browse files Browse the repository at this point in the history
  • Loading branch information
arksap2002 committed Jan 8, 2024
2 parents 280f1e2 + 77d9684 commit eaf58ac
Show file tree
Hide file tree
Showing 54 changed files with 446 additions and 434 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ src/test/resources/project/untitled/.idea/
src/test/resources/project/untitled/target/
src/test/resources/project/untitled/untitled.iml
.jqwik-database

ktlint
5 changes: 5 additions & 0 deletions ktlint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

curl -sSLO https://github.com/pinterest/ktlint/releases/download/0.49.1/ktlint
chmod a+x ktlint
$(pwd)/ktlint --format
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import com.intellij.openapi.actionSystem.AnActionEvent
import org.jetbrains.research.testspark.actions.evosuite.EvoSuitePanelFactory
import org.jetbrains.research.testspark.actions.llm.LLMPanelFactory
import org.jetbrains.research.testspark.display.TestSparkIcons
import org.jetbrains.research.testspark.helpers.getCurrentListOfCodeTypes
import org.jetbrains.research.testspark.tools.Manager
import org.jetbrains.research.testspark.tools.evosuite.EvoSuite
import org.jetbrains.research.testspark.tools.llm.Llm
Expand Down Expand Up @@ -49,11 +50,7 @@ class TestSparkAction : AnAction() {
* @param e the AnActionEvent object representing the event
*/
override fun update(e: AnActionEvent) {
if (getCurrentListOfCodeTypes(e) == null) {
e.presentation.isEnabled = false
} else {
e.presentation.isEnabled = true
}
e.presentation.isEnabled = getCurrentListOfCodeTypes(e) != null
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package org.jetbrains.research.testspark.actions.evosuite
import com.intellij.openapi.ui.ComboBox
import com.intellij.ui.components.JBLabel
import com.intellij.util.ui.FormBuilder
import org.jetbrains.research.testspark.TestSparkLabelsBundle
import org.jetbrains.research.testspark.TestSparkToolTipsBundle
import org.jetbrains.research.testspark.actions.template.ToolPanelFactory
import org.jetbrains.research.testspark.bundles.TestSparkLabelsBundle
import org.jetbrains.research.testspark.bundles.TestSparkToolTipsBundle
import org.jetbrains.research.testspark.data.ContentDigestAlgorithm
import org.jetbrains.research.testspark.services.SettingsApplicationService
import java.awt.Font
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ package org.jetbrains.research.testspark.actions.llm
import com.intellij.openapi.ui.ComboBox
import com.intellij.ui.components.JBLabel
import com.intellij.util.ui.FormBuilder
import org.jetbrains.research.testspark.TestSparkLabelsBundle
import org.jetbrains.research.testspark.TestSparkToolTipsBundle
import org.jetbrains.research.testspark.actions.template.ToolPanelFactory
import org.jetbrains.research.testspark.bundles.TestSparkLabelsBundle
import org.jetbrains.research.testspark.bundles.TestSparkToolTipsBundle
import org.jetbrains.research.testspark.helpers.addLLMPanelListeners
import org.jetbrains.research.testspark.helpers.isGrazieClassLoaded
import org.jetbrains.research.testspark.helpers.updateModelSelector
import org.jetbrains.research.testspark.services.SettingsApplicationService
import java.awt.Font
import javax.swing.DefaultComboBoxModel
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.jetbrains.research.testspark
package org.jetbrains.research.testspark.bundles

import com.intellij.DynamicBundle
import org.jetbrains.annotations.Nls
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.jetbrains.research.testspark
package org.jetbrains.research.testspark.bundles

import com.intellij.DynamicBundle
import org.jetbrains.annotations.Nls
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.jetbrains.research.testspark
package org.jetbrains.research.testspark.bundles

import com.intellij.DynamicBundle
import org.jetbrains.annotations.Nls
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.jetbrains.research.testspark
package org.jetbrains.research.testspark.bundles

import com.intellij.DynamicBundle
import org.jetbrains.annotations.Nls
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.jetbrains.research.testspark
package org.jetbrains.research.testspark.data

import com.intellij.openapi.util.io.FileUtilRt
import java.io.File
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import com.intellij.ui.JBColor
import com.intellij.ui.LanguageTextField
import com.intellij.ui.components.JBScrollPane
import com.intellij.util.ui.JBUI
import org.jetbrains.research.testspark.TestSparkBundle
import org.jetbrains.research.testspark.TestSparkLabelsBundle
import org.jetbrains.research.testspark.bundles.TestSparkBundle
import org.jetbrains.research.testspark.bundles.TestSparkLabelsBundle
import org.jetbrains.research.testspark.data.TestCase
import org.jetbrains.research.testspark.services.ErrorService
import org.jetbrains.research.testspark.services.JavaClassBuilderService
Expand Down Expand Up @@ -415,9 +415,19 @@ class TestCasePanelFactory(
)
addTest(modifiedTest)
} else {
NotificationGroupManager.getInstance()
.getNotificationGroup("LLM Execution Error")
.createNotification(
TestSparkBundle.message("llmWarningTitle"),
TestSparkBundle.message("noRequestFromLLM"),
NotificationType.WARNING,
)
.notify(project)

loadingLabel.isVisible = false
sendButton.isEnabled = true
}

if (processStopped(project, indicator)) return

indicator.stop()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package org.jetbrains.research.testspark.display

import com.intellij.openapi.components.service
import com.intellij.openapi.project.Project
import org.jetbrains.research.testspark.TestSparkBundle
import org.jetbrains.research.testspark.TestSparkLabelsBundle
import org.jetbrains.research.testspark.bundles.TestSparkBundle
import org.jetbrains.research.testspark.bundles.TestSparkLabelsBundle
import org.jetbrains.research.testspark.services.TestCaseDisplayService
import java.awt.Dimension
import javax.swing.Box
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.jetbrains.research.testspark.actions.llm
package org.jetbrains.research.testspark.helpers

import com.google.gson.JsonParser
import com.intellij.openapi.application.ApplicationManager
Expand Down

This file was deleted.

Loading

0 comments on commit eaf58ac

Please sign in to comment.