本文整理了Java中com.intellij.openapi.ui.Messages.showMessageDialog()
方法的一些代码示例,展示了Messages.showMessageDialog()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Messages.showMessageDialog()
方法的具体详情如下:
包路径:com.intellij.openapi.ui.Messages
类名称:Messages
方法名:showMessageDialog
暂无
代码示例来源:origin: pengwei1024/AndroidSourceViewer
@Override
public void run() {
Messages.showMessageDialog(message, "Error", Messages.getInformationIcon());
}
});
代码示例来源:origin: pengwei1024/AndroidSourceViewer
/**
* error message dialog
*
* @param message
*/
public static void errorMsgDialog(String message) {
Messages.showMessageDialog(message, "Error", Messages.getInformationIcon());
}
代码示例来源:origin: Haehnchen/idea-php-symfony2-plugin
@Nullable
public static PsiElement invokeCreateCompilerPass(@NotNull PhpClass bundleClass, @Nullable Editor editor) {
String className = Messages.showInputDialog("Class name for CompilerPass (no namespace needed): ", "New File", Symfony2Icons.SYMFONY);
if(StringUtils.isBlank(className)) {
return null;
}
if(!PhpNameUtil.isValidClassName(className)) {
Messages.showMessageDialog(bundleClass.getProject(), "Invalid class name", "Error", Symfony2Icons.SYMFONY);
}
try {
return PhpBundleFileFactory.createCompilerPass(bundleClass, className);
} catch (Exception e) {
if(editor != null) {
HintManager.getInstance().showErrorHint(editor, "Error:" + e.getMessage());
} else {
JOptionPane.showMessageDialog(null, "Error:" + e.getMessage());
}
}
return null;
}
代码示例来源:origin: sonar-intellij-plugin/sonar-intellij-plugin
@Override
public void mouseClicked(MouseEvent mouseEvent) {
Messages.showMessageDialog(
AVAILABLE_TEMPLATE_VARIABLES_MESSAGE,
"Analysis Script",AllIcons.Actions.Help
);
}
};
代码示例来源:origin: JetBrains/intellij-sdk-docs
public void actionPerformed(AnActionEvent event) {
Project project = event.getProject();
Messages.showMessageDialog(project, "Hello world!", "Greeting", Messages.getInformationIcon());
}
}
代码示例来源:origin: groboclown/p4ic4idea
@Override
public void textUpdated(@NotNull DocumentEvent e, @Nullable String text) {
if (getSelectedSyncType() == SyncOptions.SyncType.REV && getRevValue() < 0) {
Messages.showMessageDialog(
P4Bundle.message("sync.options.rev.error"),
P4Bundle.message("sync.options.rev.error.title"),
Messages.getErrorIcon());
} else {
updateValues(parent);
}
}
代码示例来源:origin: GoogleCloudPlatform/google-cloud-intellij
@Override
public void run() {
Messages.showMessageDialog(
AppEngineMessageBundle.message(
"appengine.stop.modules.version.success.dialog.message"),
AppEngineMessageBundle.message(
"appengine.stop.modules.version.success.dialog.title"),
General.Information);
}
});
代码示例来源:origin: Haehnchen/idea-php-toolbox
public void initComponent() {
if(!settings.serverEnabled) {
return;
}
final int port = settings.serverPort;
final String host = !settings.listenAll ? "localhost" : "0.0.0.0";
try {
server = HttpServer.create(new InetSocketAddress(host, port), 0);
} catch (IOException e) {
PhpToolboxApplicationService.LOG.error(String.format("Can't bind with server to %s:%s", host, port));
ApplicationManager.getApplication().invokeLater(() -> Messages.showMessageDialog(
String.format("Can't bind with server to %s:%s", host, port), "PHP Toolbox",
Messages.getErrorIcon()
));
return;
}
server.createContext("/", new RouterHttpHandler());
final HttpServer finalServer = server;
listenerThread = new Thread(() -> {
finalServer.start();
PhpToolboxApplicationService.LOG.info(String.format("Starting server on %s:%s", host, port));
});
listenerThread.start();
}
代码示例来源:origin: t28hub/json2java4idea
private void onError(@Nonnull NewClassDialog dialog, @Nullable Throwable cause) {
if (cause instanceof ClassAlreadyExistsException) {
Messages.showMessageDialog(
project,
bundle.message("error.message.class.exists", dialog.getClassName()),
代码示例来源:origin: zhengjunbase/codehelper.generator
LoggerWrapper.saveAllLogs(projectPath);
Messages.showMessageDialog(project, buildEffectRowMsg(genCodeResponse), genCodeResponse.getStatus(), null);
代码示例来源:origin: mustfun/mybatis-plus
String dbName = connectDbSetting.getDbName().getText();
if (StringUtils.isEmpty(dbName)){
Messages.showMessageDialog("DB名称配置不正确", "连接数据库提示", Messages.getInformationIcon());
return;
p = Integer.parseInt(port);
} catch (NumberFormatException e1) {
Messages.showMessageDialog("端口配置不正确", "连接数据库提示", Messages.getInformationIcon());
return;
Connection connection = dbService.getConnection(dbSourcePo);
if (connection == null) {
Messages.showMessageDialog("数据库连接失败", "连接数据库提示", Messages.getInformationIcon());
return;
内容来源于网络,如有侵权,请联系作者删除!