|
|
@@ -23,9 +23,9 @@ package io.xmake.run
|
|
|
import com.intellij.execution.actions.ConfigurationContext
|
|
|
import com.intellij.execution.actions.LazyRunConfigurationProducer
|
|
|
import com.intellij.execution.configurations.ConfigurationFactory
|
|
|
-import com.intellij.openapi.diagnostic.Logger
|
|
|
import com.intellij.openapi.util.Ref
|
|
|
import com.intellij.psi.PsiElement
|
|
|
+import io.xmake.utils.SystemUtils
|
|
|
|
|
|
class XMakeRunConfigurationProducer : LazyRunConfigurationProducer<XMakeRunConfiguration>() {
|
|
|
override fun getConfigurationFactory(): ConfigurationFactory {
|
|
|
@@ -46,12 +46,11 @@ class XMakeRunConfigurationProducer : LazyRunConfigurationProducer<XMakeRunConfi
|
|
|
sourceElement: Ref<PsiElement>
|
|
|
): Boolean {
|
|
|
|
|
|
- return true
|
|
|
- }
|
|
|
+ // check xmake project
|
|
|
+ if (!SystemUtils.isXMakeProject(context.project)) {
|
|
|
+ return false
|
|
|
+ }
|
|
|
|
|
|
- companion object {
|
|
|
-
|
|
|
- // get log
|
|
|
- private val Log = Logger.getInstance(XMakeRunConfigurationProducer::class.java.getName())
|
|
|
+ return true
|
|
|
}
|
|
|
}
|