New HMPP import and highlighting tests
New tests `testHmppLibAndConsumer` and `testMultiModulesHmpp` were added The first is a test with MPP library and its consumers, it checks import and also highlighting before and after the library was published The second is a project which contains three multiplatform modules and two platform modules and checks import and highlighting. Original commit: https://jetbrains.team/p/ij/repositories/intellij/revision/15582b03530eba4fa0e3d0b512bb0a4c1fa3aa4c
This commit is contained in:
committed by
teamcityserver
parent
bc5a79ffcc
commit
3d81eba32b
+2
-2
@@ -9,7 +9,7 @@ import com.intellij.openapi.util.text.StringUtil
|
||||
import org.jetbrains.kotlin.codeMetaInfo.model.CodeMetaInfo
|
||||
|
||||
abstract class AbstractCodeMetaInfoRenderConfiguration(var renderParams: Boolean = true) {
|
||||
private val clickOrPressRegex = "Click or press (.*)to navigate".toRegex() // We have different hotkeys on different platforms
|
||||
private val clickOrPressRegex = "(Click or press|Press).*(to navigate)".toRegex() // We have different hotkeys on different platforms
|
||||
open fun asString(codeMetaInfo: CodeMetaInfo): String = codeMetaInfo.tag + getAttributesString(codeMetaInfo)
|
||||
|
||||
open fun getAdditionalParams(codeMetaInfo: CodeMetaInfo) = ""
|
||||
@@ -18,7 +18,7 @@ abstract class AbstractCodeMetaInfoRenderConfiguration(var renderParams: Boolean
|
||||
if (originalText == null) return "null"
|
||||
val noHtmlTags = StringUtil.removeHtmlTags(originalText)
|
||||
.replace(" ", "")
|
||||
.replace(clickOrPressRegex, "")
|
||||
.replace(clickOrPressRegex, "$1 ... $2")
|
||||
.trim()
|
||||
return sanitizeLineBreaks(noHtmlTags)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user