本文整理匯總了Java中com.intellij.notification.Notification.getTitle方法的典型用法代碼示例。如果您正苦於以下問題:Java Notification.getTitle方法的具體用法?Java Notification.getTitle怎麽用?Java Notification.getTitle使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.intellij.notification.Notification
的用法示例。
在下文中一共展示了Notification.getTitle方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: buildHtml
import com.intellij.notification.Notification; //導入方法依賴的package包/類
public static String buildHtml(@NotNull final Notification notification, @Nullable String style) {
String title = notification.getTitle();
String content = notification.getContent();
if (title.length() > TITLE_LIMIT || content.length() > CONTENT_LIMIT) {
LOG.info("Too large notification " + notification + " of " + notification.getClass() +
"\nListener=" + notification.getListener() +
"\nTitle=" + title +
"\nContent=" + content);
title = StringUtil.trimLog(title, TITLE_LIMIT);
content = StringUtil.trimLog(content, CONTENT_LIMIT);
}
return buildHtml(title, content, style, "#" + ColorUtil.toHex(getMessageType(notification).getTitleForeground()));
}
示例2: tos
import com.intellij.notification.Notification; //導入方法依賴的package包/類
@NotNull
private static String tos(@NotNull Notification notification) {
return notification.getTitle() + "|" + notification.getContent();
}