use of org.jetbrains.android.exportSignedPackage.CheckModulePanel in project android by JetBrains.
the class GenerateSignedApkAction method checkFacet.
private static boolean checkFacet(@NotNull AndroidFacet facet) {
final CheckModulePanel panel = new CheckModulePanel();
panel.updateMessages(facet);
final boolean hasError = panel.hasError();
if (hasError || panel.hasWarnings()) {
DialogWrapper dialog = new DialogWrapper(facet.getModule().getProject()) {
{
if (!hasError) {
setOKButtonText("Continue");
}
init();
}
@NotNull
@Override
protected Action[] createActions() {
if (hasError) {
return new Action[] { getOKAction() };
}
return super.createActions();
}
@Override
protected JComponent createCenterPanel() {
return panel;
}
};
dialog.setTitle(hasError ? CommonBundle.getErrorTitle() : CommonBundle.getWarningTitle());
dialog.show();
return !hasError && dialog.isOK();
}
return true;
}
Aggregations