Revert "Don't collect logs in case canceled is pressed"

This reverts commit 9b5620c
This commit is contained in:
Maxim.Kolmakov
2017-10-27 14:45:11 +02:00
parent 63a8c13b31
commit be341b3429
@@ -49,28 +49,25 @@ public class CollectZippedLogsAction extends AnAction implements DumbAware {
final boolean doNotShowDialog = PropertiesComponent.getInstance().getBoolean(CONFIRMATION_DIALOG);
int response = Messages.OK;
if (!doNotShowDialog) {
response = Messages.showOkCancelDialog(
project, "Included log and settings may contain sensitive data.", "Sensitive Data",
Messages.OK_BUTTON, Messages.CANCEL_BUTTON, Messages.getWarningIcon(),
new DialogWrapper.DoNotAskOption.Adapter() {
@Override
public void rememberChoice(final boolean selected, final int exitCode) {
PropertiesComponent.getInstance().setValue(CONFIRMATION_DIALOG, selected);
}
}
);
}
try {
if (response == Messages.OK) {
final File zippedLogsFile = createZip(project);
if (ShowFilePathAction.isSupported()) {
ShowFilePathAction.openFile(zippedLogsFile);
}
else {
Messages.showInfoMessage(zippedLogsFile.getAbsolutePath(), "Log File");
}
final File zippedLogsFile = createZip(project);
if (!doNotShowDialog) {
Messages.showIdeaMessageDialog(
project, "Included log and settings may contain sensitive data.", "Sensitive Data",
new String[]{Messages.OK_BUTTON}, 1, Messages.getInformationIcon(),
new DialogWrapper.DoNotAskOption.Adapter() {
@Override
public void rememberChoice(final boolean selected, final int exitCode) {
PropertiesComponent.getInstance().setValue(CONFIRMATION_DIALOG, selected);
}
}
);
}
if (ShowFilePathAction.isSupported()) {
ShowFilePathAction.openFile(zippedLogsFile);
}
else {
Messages.showInfoMessage(zippedLogsFile.getAbsolutePath(), "Log File");
}
}
catch (final IOException exception) {