mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[ui] reduces text duplication in exception dialog (IDEA-190797)
This commit is contained in:
@@ -272,7 +272,7 @@ public class IdeErrorsDialog extends DialogWrapper implements MessagePoolListene
|
||||
myNoticeArea.addHyperlinkListener(BrowserHyperlinkListener.INSTANCE);
|
||||
|
||||
JPanel decoratorPanel = new JPanel(new BorderLayout());
|
||||
myNoticeDecorator = new HideableDecorator(decoratorPanel, DiagnosticBundle.message("error.dialog.notice.label"), false);
|
||||
myNoticeDecorator = new NoticeDecorator(decoratorPanel);
|
||||
myNoticeDecorator.setContentComponent(myNoticeArea);
|
||||
|
||||
JPanel commentPanel = new JPanel(new BorderLayout());
|
||||
@@ -631,17 +631,6 @@ public class IdeErrorsDialog extends DialogWrapper implements MessagePoolListene
|
||||
|
||||
/* UI components */
|
||||
|
||||
private static class AttachmentsList extends CheckBoxList<String> {
|
||||
private void addItem(String item, boolean selected) {
|
||||
super.addItem(item, item + " ", selected);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isEnabled(int index) {
|
||||
return index > 0;
|
||||
}
|
||||
}
|
||||
|
||||
private class BackAction extends AnAction implements DumbAware {
|
||||
public BackAction() {
|
||||
super("Previous", null, AllIcons.Actions.Back);
|
||||
@@ -714,6 +703,35 @@ public class IdeErrorsDialog extends DialogWrapper implements MessagePoolListene
|
||||
}
|
||||
}
|
||||
|
||||
private static class AttachmentsList extends CheckBoxList<String> {
|
||||
private void addItem(String item, boolean selected) {
|
||||
super.addItem(item, item + " ", selected);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isEnabled(int index) {
|
||||
return index > 0;
|
||||
}
|
||||
}
|
||||
|
||||
private static class NoticeDecorator extends HideableDecorator {
|
||||
private NoticeDecorator(JPanel panel) {
|
||||
super(panel, "...", false);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void on() {
|
||||
super.on();
|
||||
setTitle(DiagnosticBundle.message("error.dialog.notice.label.expanded"));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void off() {
|
||||
super.off();
|
||||
setTitle(DiagnosticBundle.message("error.dialog.notice.label"));
|
||||
}
|
||||
}
|
||||
|
||||
/* interfaces */
|
||||
|
||||
@Override
|
||||
|
||||
@@ -33,6 +33,7 @@ error.dialog.foreign.plugin.warning.vendor=<html>This plugin is not a production
|
||||
error.dialog.comment.prompt=<html>Please fill in any details that may be important (steps to reproduce, what were you doing when the exception occurred, etc.):</html>
|
||||
error.dialog.attachments.prompt=<html>Please review the data included in this exception report:</html>
|
||||
error.dialog.notice.label=<html><b>By submitting this report, you agree to the terms and conditions of the privacy policy</b></html>
|
||||
error.dialog.notice.label.expanded=<html><b>Privacy policy</b></html>
|
||||
error.dialog.submit.anonymous=<html>Submit anonymously or use <a>JetBrains Account</a></html>
|
||||
error.dialog.submit.named=<html>Submit as <b>{0}</b> or <a>change account</a></html>
|
||||
error.report.to.jetbrains.action=&Report to JetBrains
|
||||
|
||||
Reference in New Issue
Block a user