本文整理了Java中com.intellij.openapi.ui.Messages.showInfoMessage()
方法的一些代码示例,展示了Messages.showInfoMessage()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Messages.showInfoMessage()
方法的具体详情如下:
包路径:com.intellij.openapi.ui.Messages
类名称:Messages
方法名:showInfoMessage
暂无
代码示例来源:origin: hsz/idea-gitignore
myListModel.addElement(template);
Messages.showInfoMessage(templatesListPanel,
IgnoreBundle.message("action.importTemplates.success", templates.size()),
IgnoreBundle.message("action.exportTemplates.success.title"));
代码示例来源:origin: hsz/idea-gitignore
@Override
public void actionPerformed(@NotNull AnActionEvent event) {
final VirtualFileWrapper wrapper = FileChooserFactory.getInstance().createSaveFileDialog(
new FileSaverDescriptor(
IgnoreBundle.message("action.exportTemplates.wrapper"),
"",
FILE_EXTENSION
),
templatesListPanel
).save(null, null);
if (wrapper != null) {
final List<IgnoreSettings.UserTemplate> items = getCurrentItems();
final org.jdom.Document document = new org.jdom.Document(
IgnoreSettings.createTemplatesElement(items)
);
try {
JDOMUtil.writeDocument(document, wrapper.getFile(), Constants.NEWLINE);
Messages.showInfoMessage(templatesListPanel,
IgnoreBundle.message("action.exportTemplates.success", items.size()),
IgnoreBundle.message("action.exportTemplates.success.title"));
} catch (IOException e) {
Messages.showErrorDialog(
templatesListPanel,
IgnoreBundle.message("action.exportTemplates.error")
);
}
}
}
代码示例来源:origin: Haehnchen/idea-php-symfony2-plugin
Messages.showInfoMessage("File exists", "Error");
return;
代码示例来源:origin: dboissier/mongo4idea
private void initListeners() {
testConnectionButton.addActionListener(actionEvent -> {
ServerConfiguration configuration = createServerConfigurationForTesting();
final Ref<Exception> excRef = new Ref<>();
final ProgressManager progressManager = ProgressManager.getInstance();
progressManager.runProcessWithProgressSynchronously(() -> {
final ProgressIndicator progressIndicator = progressManager.getProgressIndicator();
if (progressIndicator != null) {
progressIndicator.setText("Connecting to Mongo server...");
}
try {
mongoManager.connect(configuration);
} catch (Exception ex) {
excRef.set(ex);
}
}, "Testing Connection", true, ServerConfigurationPanel.this.project);
if (!excRef.isNull()) {
Messages.showErrorDialog(rootPanel, excRef.get().getMessage(), "Connection Test Failed");
} else {
Messages.showInfoMessage(rootPanel, "Connection test successful", "Connection Test Successful");
}
});
}
代码示例来源:origin: misakuo/svgtoandroid
public static void show(Project project,String txt) {
Messages.showInfoMessage(project,txt,"Information");
}
}
代码示例来源:origin: protostuff/protobuf-jetbrains-plugin
@Override
public boolean submit(@NotNull IdeaLoggingEvent[] events, @Nullable String additionalInfo,
@NotNull Component parentComponent, @NotNull Consumer<SubmittedReportInfo> consumer) {
EventBuilder eventBuilder = createEvent(events, additionalInfo);
sentry.sendEvent(eventBuilder);
consumer.consume(new SubmittedReportInfo(null, null, NEW_ISSUE));
Messages.showInfoMessage(parentComponent, DEFAULT_RESPONSE, DEFAULT_RESPONSE_TITLE);
return true;
}
代码示例来源:origin: Camelcade/Perl5-IDEA
() -> Messages.showInfoMessage(PerlBundle.message("perl.vm.empty.list.message"), PerlBundle.message("perl.vm.empty.list.title")));
return;
代码示例来源:origin: uwolfer/gerrit-intellij-plugin
@Override
public void actionPerformed(ActionEvent e) {
String password = isPasswordModified() ? getPassword() : gerritSettings.getPassword();
String host = getHost();
if (Strings.isNullOrEmpty(host)) {
Messages.showErrorDialog(pane, "Required field URL not specified", "Test Failure");
return;
}
try {
GerritAuthData.Basic gerritAuthData = new GerritAuthData.Basic(host, getLogin(), password);
if (gerritUtil.checkCredentials(ProjectManager.getInstance().getDefaultProject(), gerritAuthData)) {
Messages.showInfoMessage(pane, "Connection successful", "Success");
} else {
Messages.showErrorDialog(pane, "Can't login to " + host + " using given credentials", "Login Failure");
}
} catch (Exception ex) {
log.info(ex);
Messages.showErrorDialog(pane, String.format("Can't login to %s: %s", host, gerritUtil.getErrorTextFromException(ex)),
"Login Failure");
}
setPassword(password);
}
});
代码示例来源:origin: makejavas/EasyCode
Messages.showInfoMessage("导入完成", MsgValue.TITLE_INFO);
} catch (IOException e1) {
ExceptionUtil.rethrow(e1);
代码示例来源:origin: intellij-dlanguage/intellij-dlanguage
public boolean doQuickImport(final VirtualFile file, final WizardContext context) {
final DubProjectImportBuilder builder = getBuilder();
final VirtualFile rootDirectory = file.getParent();
if(StringUtil.isNotEmpty(ToolKey.DUB_KEY.getPath())) {
builder.getParameters().dubBinary = ToolKey.DUB_KEY.getPath();
//builder.setRootDirectory(context.getProjectFileDirectory());
builder.setRootDirectory(rootDirectory.getPath());
context.setProjectName(rootDirectory.getName());
LOG.debug("Opening dub project");
return true;
} else {
LOG.warn("Couldn't open project as dub not configured");
Messages.showInfoMessage(DlangBundle.INSTANCE.message("d.ui.projectopen.missing.dub.binary"), DlangBundle.INSTANCE.message("d.ui.projectopen.dub"));
return false;
}
}
}
内容来源于网络,如有侵权,请联系作者删除!