本文整理汇总了Java中com.intellij.openapi.ui.Messages.showIdeaMessageDialog方法的典型用法代码示例。如果您正苦于以下问题:Java Messages.showIdeaMessageDialog方法的具体用法?Java Messages.showIdeaMessageDialog怎么用?Java Messages.showIdeaMessageDialog使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.openapi.ui.Messages
的用法示例。
在下文中一共展示了Messages.showIdeaMessageDialog方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: beforeAction
import com.intellij.openapi.ui.Messages; //导入方法依赖的package包/类
@Override
public boolean beforeAction() {
String exePath = RNPathUtil.getExecuteFileFullPath(EXEC);
if (exePath == null || EXEC.equals(RNPathUtil.getExecuteFileFullPath(EXEC))) {
int options = Messages.showIdeaMessageDialog(getProject(),
"Would you like to install " + EXEC + " globally now?\n" +
"This might take one or two minutes without any console update, please wait for the final result.\n" +
"After that, you'll need to click this button again.",
"Can Not Found " + EXEC, new String[]{"Yes", "No"}, 0,
AllIcons.General.QuestionDialog, new DialogWrapper.DoNotAskOption.Adapter() {
@Override
public void rememberChoice(boolean b, int i) {
}
});
if (options == 0) {
cmd = INSTALL_CMD;
return true;
} else {
RNConsoleImpl consoleView = terminal.getRNConsole(getText(), getIcon());
if (consoleView != null) {
consoleView.clear();
consoleView.print(
"Can't found " + EXEC + ", if you were first running this command, make sure you have " + EXEC + " installed globally.\n" +
"To install, please run in terminal with command: \n" +
INSTALL_CMD +
"\n\n",
ConsoleViewContentType.ERROR_OUTPUT);
}
return false;
}
}
cmd = EXEC;
return true;
}
示例2: beforeAction
import com.intellij.openapi.ui.Messages; //导入方法依赖的package包/类
@Override
public boolean beforeAction() {
String exePath = RNPathUtil.getExecuteFileFullPath(EXEC);
if (exePath == null || EXEC.equals(RNPathUtil.getExecuteFileFullPath(EXEC))) {
// GlobalPropertyBasedDoNotAskOption dontAsk = new GlobalPropertyBasedDoNotAskOption("react-devtools.to.show"); // TODO no use so far
int options = Messages.showIdeaMessageDialog(getProject(),
"Would you like to install react-devtools globally now?\n" +
"This might take one or two minutes without any console update, please wait for the final result.\n" +
"After that, you'll need to click this button again.",
"Can Not Found React-Devtools", new String[]{"Yes", "No"}, 0,
AllIcons.General.QuestionDialog, new DialogWrapper.DoNotAskOption.Adapter() {
@Override
public void rememberChoice(boolean b, int i) {
}
});
if (options == 0) {
cmd = "npm install -g react-devtools";
return true;
} else {
RNConsoleImpl consoleView = terminal.getRNConsole(getText(), getIcon());
if (consoleView != null) {
consoleView.clear();
consoleView.print(
"Can't found " + EXEC + ", if you were first running this command, make sure you have react-devtools installed globally.\n" +
"To install by yourself, please run in terminal with command: \n" +
"npm install -g react-devtools\n\n",
ConsoleViewContentType.ERROR_OUTPUT);
}
return false;
}
}
cmd = EXEC;
return true;
}
示例3: promptUserForProxy
import com.intellij.openapi.ui.Messages; //导入方法依赖的package包/类
@Nullable
private static ConnectionState promptUserForProxy() {
int selection = Messages.showIdeaMessageDialog(null, "Unable to access Android SDK add-on list", "Android Studio First Run",
new String[]{"Setup Proxy", "Cancel"}, 1, Messages.getErrorIcon(), null);
if (selection == 0) {
//noinspection ConstantConditions
HttpConfigurable.editConfigurable(null);
return null;
}
else {
return ConnectionState.NO_CONNECTION;
}
}
示例4: beforeAction
import com.intellij.openapi.ui.Messages; //导入方法依赖的package包/类
@Override
public boolean beforeAction() {
String exePath = RNPathUtil.getExecuteFileFullPath(IOS_DEPLOY);
if (exePath == null || IOS_DEPLOY.equals(RNPathUtil.getExecuteFileFullPath(IOS_DEPLOY))) {
// GlobalPropertyBasedDoNotAskOption dontAsk = new GlobalPropertyBasedDoNotAskOption("react-devtools.to.show"); // TODO no use so far
int options = Messages.showIdeaMessageDialog(getProject(),
"Would you like to install ios-deploy globally now?\n" +
"This might take one or two minutes without any console update, please wait for the final result.\n" +
"After that, you'll need to click this button again.",
"Can Not Found Ios-Deploy", new String[]{"Yes", "No"}, 0,
AllIcons.General.QuestionDialog, new DialogWrapper.DoNotAskOption.Adapter() {
@Override
public void rememberChoice(boolean b, int i) {
}
});
if (options == 0) {
cmd = "npm install -g ios-deploy";
return true;
} else {
RNConsoleImpl consoleView = terminal.getRNConsole(getText(), getIcon());
if (consoleView != null) {
consoleView.clear();
consoleView.print(
"Can't found " + IOS_DEPLOY + ", if you were first running this command, make sure you have ios-deploy installed globally.\n" +
"To install, please run in terminal with command: \n" +
"npm install -g ios-deploy\n" +
"And now please connect your iPhone to USB and enable developer mode.\n\n",
ConsoleViewContentType.ERROR_OUTPUT);
}
return false;
}
}
cmd = EXEC;
return true;
}