-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
665 additions
and
628 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...lugin/src/main/java/org/mule/tooling/lang/dw/lineMarker/RunTestLineMarkerContributor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package org.mule.tooling.lang.dw.lineMarker; | ||
|
||
import com.intellij.execution.lineMarker.ExecutorAction; | ||
import com.intellij.execution.lineMarker.RunLineMarkerContributor; | ||
import com.intellij.icons.AllIcons; | ||
import com.intellij.openapi.actionSystem.AnAction; | ||
import com.intellij.openapi.util.text.StringUtil; | ||
import com.intellij.psi.PsiElement; | ||
import com.intellij.util.containers.ContainerUtil; | ||
import org.jetbrains.annotations.NotNull; | ||
import org.mule.tooling.lang.dw.testintegration.WeaveTestFramework; | ||
|
||
public class RunTestLineMarkerContributor extends RunLineMarkerContributor { | ||
|
||
public Info getInfo(@NotNull PsiElement element){ | ||
if(WeaveTestFramework.isWeaveTestMethod(element)){ | ||
final AnAction[] actions = ExecutorAction.getActions(Integer.MAX_VALUE); | ||
return new Info( | ||
AllIcons.RunConfigurations.TestState.Run, | ||
actions, | ||
e -> StringUtil.join(ContainerUtil.mapNotNull(actions, action -> getText(action, e)), "\n") | ||
); | ||
} | ||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.