本文整理匯總了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;
}