Skip to content

Commit 6f39b0a

Browse files
committed
comment on get order
1 parent 49d59ba commit 6f39b0a

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

jvm-common/src/main/kotlin/org/digma/intellij/plugin/idea/execution/flavor/InstrumentationFlavor.kt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ enum class Flavor { Default, Micronaut, Quarkus, SpringBootMicrometer, OpenLiber
2121
the selected flavor is SpringBootMicrometer but it doesn't produce data. changing to
2222
INSTRUMENTATION_FLAVOR=Default works.
2323
* a test annotated with @MicronautTest does not produce test data
24-
25-
2624
*/
2725

2826
interface InstrumentationFlavor {
@@ -84,6 +82,16 @@ interface InstrumentationFlavor {
8482
}
8583

8684

85+
/**
86+
* the order in which accept method is invoked to select a flavor.
87+
* it is necessary because in some cases more than one flavor may be applicable for a configuration.
88+
* for example: both Quarkus and Default are applicable when running a quarkus app using intellij ApplicationConfiguration,
89+
* but if it's a quarkus module we want the quarkus to be selected.
90+
* so making quarkus higher order than default will select quarkus.
91+
* there are not so many cases, the above is the first and currently the only one we know of.
92+
* some flavors are the same higher order, but they should not accept the same configuration.
93+
* DefaultInstrumentationFlavor should be the lowest order
94+
*/
8795
fun getOrder(): Int
8896

8997
fun getPreferredUserFlavor(): Flavor

0 commit comments

Comments
 (0)