Skip to content

Commit a4bce6f

Browse files
committed
fix(cpp): fix run config issue for temp, make as todos
1 parent 31c5f10 commit a4bce6f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

cpp/src/main/kotlin/cc/unitmesh/cpp/provider/testing/CppWriteTestService.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ import com.intellij.openapi.project.guessProjectDir
1111
import com.intellij.openapi.vfs.VirtualFile
1212
import com.intellij.psi.PsiElement
1313
import com.intellij.psi.PsiFile
14-
import com.jetbrains.cidr.cpp.execution.CMakeAppRunConfiguration
1514
import com.jetbrains.cidr.lang.OCLanguage
1615
import com.jetbrains.cidr.lang.psi.OCFunctionDeclaration
1716

1817
class CppWriteTestService : WriteTestService() {
19-
override fun runConfigurationClass(project: Project): Class<out RunProfile> = CMakeAppRunConfiguration::class.java
18+
// TODO in Cpp233 and Cpp222 the RunProfile is different, maybe we can use the same RunProfile in future
19+
override fun runConfigurationClass(project: Project): Class<out RunProfile>? = null
2020

2121
override fun isApplicable(element: PsiElement): Boolean {
2222
return element.language is OCLanguage

src/main/kotlin/cc/unitmesh/devti/provider/WriteTestService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ abstract class WriteTestService : LazyExtensionInstance<WriteTestService>() {
4040
* @param project The project for which to retrieve the run configuration class.
4141
* @return The run configuration class for the project.
4242
*/
43-
abstract fun runConfigurationClass(project: Project): Class<out RunProfile>
43+
abstract fun runConfigurationClass(project: Project): Class<out RunProfile>?
4444
abstract fun isApplicable(element: PsiElement): Boolean
4545
/**
4646
* Finds or creates a test file for the given source file, project, and element.

0 commit comments

Comments
 (0)