File tree Expand file tree Collapse file tree 3 files changed +10
-16
lines changed
marker/src/main/kotlin/spp/jetbrains/marker
plugin/src/main/kotlin/spp/jetbrains/sourcemarker Expand file tree Collapse file tree 3 files changed +10
-16
lines changed Original file line number Diff line number Diff line change @@ -125,4 +125,12 @@ object SourceMarkerUtils {
125125 SwingUtilities .invokeLater { action.invoke() }
126126 }
127127 }
128+
129+ fun substringAfterIgnoreCase (str : String , search : String ): String {
130+ val index = str.indexOf(search, ignoreCase = true )
131+ if (index == - 1 ) {
132+ return str
133+ }
134+ return str.substring(index + search.length)
135+ }
128136}
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import spp.jetbrains.ScopeExtensions.safeRunBlocking
2424import spp.jetbrains.command.LiveCommand
2525import spp.jetbrains.command.LiveCommandContext
2626import spp.jetbrains.command.LiveLocationContext
27+ import spp.jetbrains.marker.SourceMarkerUtils.substringAfterIgnoreCase
2728import spp.jetbrains.marker.service.ArtifactCreationService
2829import spp.jetbrains.marker.service.ArtifactNamingService
2930import spp.jetbrains.marker.service.ArtifactScopeService
@@ -170,12 +171,4 @@ object CommandBarController {
170171 }
171172 return null
172173 }
173-
174- private fun substringAfterIgnoreCase (str : String , search : String ): String {
175- val index = str.indexOf(search, ignoreCase = true )
176- if (index == - 1 ) {
177- return str
178- }
179- return str.substring(index + search.length)
180- }
181174}
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import com.intellij.util.ui.UIUtil
2424import spp.jetbrains.PluginUI
2525import spp.jetbrains.PluginUI.SMALLEST_FONT
2626import spp.jetbrains.icons.PluginIcons
27+ import spp.jetbrains.marker.SourceMarkerUtils.substringAfterIgnoreCase
2728import spp.jetbrains.sourcemarker.command.ui.status.element.AutocompleteDropdown
2829import spp.jetbrains.sourcemarker.service.instrument.log.VariableParser
2930import spp.protocol.artifact.ArtifactQualifiedName
@@ -497,12 +498,4 @@ class AutocompleteField<T : AutocompleteFieldRow>(
497498 fun interface SaveListener {
498499 fun onSave ()
499500 }
500-
501- private fun substringAfterIgnoreCase (str : String , search : String ): String {
502- val index = str.indexOf(search, ignoreCase = true )
503- if (index == - 1 ) {
504- return str
505- }
506- return str.substring(index + search.length)
507- }
508501}
You can’t perform that action at this time.
0 commit comments