Interface CommentTransformationHelper
-
public interface CommentTransformationHelper
Represents the class intended to provide all information needed for comment transformation.Example: Let's consider the comment "blah-blah-blah #1234", where "#1234" is the issue id. When shown in UI, this substring is replaced with a link to a corresponding issue and a popup; and in order to construct such a replacement, server needs to know:
- the pattern to extract issue id's out of the comment;
- the URL to the corresponding issue.
Note: each
CommentTransformationHelper
corresponds to a single issue provider.- Since:
- 5.0
- Author:
- Maxim Podkolzine (maxim.podkolzine@jetbrains.com)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
composeUrl(String id)
Returns the URL corresponding to the matched id.String
extractId(String match)
Returns the issue id by the matched substring.Pattern
getSearchPattern()
Returns the search pattern of issue id.
-
-
-
Method Detail
-
getSearchPattern
@NotNull Pattern getSearchPattern()
Returns the search pattern of issue id.- Returns:
- search pattern
-
extractId
@NotNull String extractId(@NotNull String match)
Returns the issue id by the matched substring.Method is useful, if the issue id doesn't equal to the match (e.g. the match is "#1234", while actual issue id is just "1234").
- Parameters:
match
- the matched substring- Returns:
- issue id
-
-