IDE errors dialog - fix initial size

This commit is contained in:
Kirill.Safonov
2011-08-18 22:55:04 +04:00
parent ed0bdc7f9f
commit cbe58c4c1f
4 changed files with 10 additions and 21 deletions
@@ -59,9 +59,10 @@ import java.util.List;
public class IdeErrorsDialog extends DialogWrapper implements MessagePoolListener, TypeSafeDataProvider {
private static final Logger LOG = Logger.getInstance(IdeErrorsDialog.class.getName());
private static final boolean INTERNAL_MODE = ApplicationManagerEx.getApplicationEx().isInternal();
public static final boolean INTERNAL_MODE = ApplicationManagerEx.getApplicationEx().isInternal();
@NonNls private static final String ACTIVE_TAB_OPTION = IdeErrorsDialog.class.getName() + "activeTab";
public static DataKey<String> CURRENT_TRACE_KEY = DataKey.create("current_stack_trace_key");
public static final int COMPONENTS_WIDTH = 670;
private JPanel myContentPane;
private JPanel myBackButtonPanel;
@@ -544,7 +545,6 @@ public class IdeErrorsDialog extends DialogWrapper implements MessagePoolListene
// take first line
msg = msg.substring(0, i);
}
msg = StringUtil.first(msg, 200, true);
myCommentsTabForm.setErrorText(msg);
}
else {
@@ -1,11 +1,13 @@
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
@@ -17,6 +19,7 @@ public class CommentsTabForm {
public CommentsTabForm() {
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());
@@ -1,11 +1,13 @@
package com.intellij.diagnostic.errordialog;
import com.intellij.diagnostic.DiagnosticBundle;
import com.intellij.diagnostic.IdeErrorsDialog;
import com.intellij.ui.IdeBorderFactory;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
import java.awt.*;
/**
* @author ksafonov
@@ -20,6 +22,7 @@ public class DetailsTabForm {
public DetailsTabForm(@Nullable Action analyzeAction) {
myCommentsArea.setTitle(DiagnosticBundle.message("error.dialog.comment.prompt"));
myDetailsPane.setBackground(UIUtil.getTextFieldBackground());
myDetailsPane.setPreferredSize(new Dimension(IdeErrorsDialog.COMPONENTS_WIDTH, IdeErrorsDialog.INTERNAL_MODE ? 500 : 205));
myDetailsHolder.setBorder(IdeBorderFactory.createBorder());
if (analyzeAction != null) {
myAnalyzeStacktraceButton.setAction(analyzeAction);
@@ -84,28 +84,11 @@
</grid>
</children>
</grid>
<grid id="3e6fb" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<grid id="3e6fb" binding="myTabsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints border-constraint="Center"/>
<properties/>
<border type="none"/>
<children>
<grid id="e8f39" binding="myTabsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
<border type="none">
<size top="5" left="0" bottom="0" right="0"/>
</border>
<children/>
</grid>
<hspacer id="2b69d">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
</hspacer>
</children>
<children/>
</grid>
<grid id="3eb3d" binding="myCredentialsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
<constraints border-constraint="South"/>