@SuppressWarnings({"PMD.NPathComplexity"})
    public CharSequence getText(@Nullable final Context ctx) {
        final Context context = ctx == null && CgeoApplication.getInstance() != null ? CgeoApplication.getInstance().getApplicationContext() : ctx;
        CharSequence text;
        if (this.textId > 0 && context != null) {
            text = context.getResources().getText(this.textId);
        } else if (this.text != null) {
            text = this.text;
        } else if (this.concatTexts != null && this.concatTexts.length > 0) {
            final CharSequence[] subtexts = new CharSequence[this.concatTexts.length];
            for (int i = 0; i < subtexts.length; i++) {
                subtexts[i] = this.concatTexts[i].getText(context);
            }
            text = TextUtils.concat(subtexts);
        } else {
            return null;
        }

        //parameters
        if (this.textParams != null && this.textParams.length > 0) {
            text = LocalizationUtils.getStringWithFallback(0, text.toString(), this.textParams);
        }

        //capitalize
        if (this.allCaps) {
            text = text.toString().toUpperCase(Locale.ROOT);
        }

        //markdown
        if (this.useMarkdown && context != null) {
            final Markwon markwon = MarkdownUtils.create(context);
            text = markwon.toMarkdown(text.toString());
        }

        //html
        if (this.useHtml) {
            text = HtmlCompat.fromHtml(text.toString(), HtmlCompat.FROM_HTML_MODE_LEGACY);
        }

        //linkify
        if (this.linkifyMask != 0) {
            final SpannableString linkifyString = SpannableString.valueOf(text);
            ViewUtils.safeAddLinks(linkifyString, this.linkifyMask);
            text = linkifyString;
        }

        return text;
    }
creates text (CharSequence) to assign to a TextView according to this TextParam settings
main/src/main/java/cgeo/geocaching/ui/TextParam.java