Example usage for com.intellij.openapi.ui.popup ComponentPopupBuilder setAdText

List of usage examples for com.intellij.openapi.ui.popup ComponentPopupBuilder setAdText

Introduction

In this page you can find the example usage for com.intellij.openapi.ui.popup ComponentPopupBuilder setAdText.

Prototype

@NotNull
ComponentPopupBuilder setAdText(@Nullable String text);

Source Link

Document

Adds "advertising" text to the bottom (e.g.: hints in code completion popup).

Usage

From source file:com.urswolfer.intellij.plugin.gerrit.ui.diff.CommentBalloonBuilder.java

License:Apache License

public JBPopup getNewCommentBalloon(final CommentForm balloonContent, @NotNull final String title) {
    final ComponentPopupBuilder builder = jbPopupFactory.createComponentPopupBuilder(balloonContent,
            balloonContent);// w  ww.  ja  v a 2s.c o m
    builder.setAdText("Hit Ctrl+Enter to create comment. It will be published once you post your review.");
    builder.setTitle(title);
    builder.setResizable(true);
    builder.setMovable(true);
    builder.setRequestFocus(true);
    builder.setCancelOnClickOutside(false);
    builder.setCancelOnWindowDeactivation(false);
    return builder.createPopup();
}