diff --git a/platform/platform-impl/src/com/intellij/diagnostic/errordialog/CommentsTabForm.form b/platform/platform-impl/src/com/intellij/diagnostic/errordialog/CommentsTabForm.form index 5f9377d46b33..20e24dc55cf9 100644 --- a/platform/platform-impl/src/com/intellij/diagnostic/errordialog/CommentsTabForm.form +++ b/platform/platform-impl/src/com/intellij/diagnostic/errordialog/CommentsTabForm.form @@ -10,25 +10,27 @@ - - - - - - - - - - + + + + + + + + + - + + + + diff --git a/platform/platform-impl/src/com/intellij/diagnostic/errordialog/CommentsTabForm.java b/platform/platform-impl/src/com/intellij/diagnostic/errordialog/CommentsTabForm.java index feb4e6afadf2..3ef12d551ed5 100644 --- a/platform/platform-impl/src/com/intellij/diagnostic/errordialog/CommentsTabForm.java +++ b/platform/platform-impl/src/com/intellij/diagnostic/errordialog/CommentsTabForm.java @@ -1,13 +1,10 @@ package com.intellij.diagnostic.errordialog; import com.intellij.diagnostic.DiagnosticBundle; -import com.intellij.diagnostic.IdeErrorsDialog; -import com.intellij.openapi.ui.LabeledComponent; import com.intellij.ui.IdeBorderFactory; import com.intellij.util.ui.UIUtil; import javax.swing.*; -import java.awt.*; /** * @author ksafonov @@ -15,14 +12,28 @@ import java.awt.*; public class CommentsTabForm { private LabeledTextComponent myCommentsArea; private JPanel myContentPane; - private LabeledComponent myErrorComponent; + private LabeledTextComponent myErrorComponent; + private JPanel myErrorPanel; + private JPanel myCommentsPanel; public CommentsTabForm() { + myErrorComponent = new LabeledTextComponent(); + myErrorComponent.setTitle(DiagnosticBundle.message("error.dialog.error.prompt")); + + myCommentsArea = new LabeledTextComponent(); myCommentsArea.setTitle(DiagnosticBundle.message("error.dialog.comment.prompt")); - myErrorComponent.getComponent().setPreferredSize(new Dimension(IdeErrorsDialog.COMPONENTS_WIDTH, -1)); - myErrorComponent.getComponent().setEditable(false); - myErrorComponent.getComponent().setBackground(UIUtil.getTextFieldBackground()); - myErrorComponent.getComponent().setBorder(IdeBorderFactory.createBorder()); + + JTextArea errorArea = myErrorComponent.getTextComponent(); + //errorArea.setPreferredSize(new Dimension(IdeErrorsDialog.COMPONENTS_WIDTH, -1)); + errorArea.setLineWrap(true); + errorArea.setEditable(false); + errorArea.setBackground(UIUtil.getTextFieldBackground()); + errorArea.setBorder(IdeBorderFactory.createBorder()); + + myCommentsArea.getTextComponent().setLineWrap(true); + + myErrorPanel.add(myErrorComponent.getContentPane()); + myCommentsPanel.add(myCommentsArea.getContentPane()); } public JPanel getContentPane() { @@ -30,8 +41,8 @@ public class CommentsTabForm { } public void setErrorText(String s) { - myErrorComponent.getComponent().setText(s); - myErrorComponent.getComponent().setCaretPosition(0); + myErrorComponent.getTextComponent().setText(s); + myErrorComponent.getTextComponent().setCaretPosition(0); } public void setCommentText(String s) { diff --git a/platform/platform-resources-en/src/messages/DiagnosticBundle.properties b/platform/platform-resources-en/src/messages/DiagnosticBundle.properties index 0d8fd8f9e618..1cbcb0c6d4dc 100644 --- a/platform/platform-resources-en/src/messages/DiagnosticBundle.properties +++ b/platform/platform-resources-en/src/messages/DiagnosticBundle.properties @@ -71,6 +71,7 @@ title.submitting.error.report=Submitting error report log.console.filter.show.errors.warnings.and.infos=infos log.console.filter.show.prefix=Log level: error.comments.tab.title=Comments +error.dialog.error.prompt=&Error message error.dialog.comment.prompt=Please fill in any details that may be important: steps to reproduce, what were you doing when problem occurred, etc.: error.details.tab.title=Details error.dialog.disable.plugin.prompt.dependants=Are you sure you would like to disable plugin {0}?
Functionality provided by the plugin and dependent plugins will no longer be available.