From ec17f5b74e4627bb1a64794786b3cc41c1f28266 Mon Sep 17 00:00:00 2001 From: Maxim Shafirov Date: Mon, 12 Mar 2012 16:46:44 +0400 Subject: [PATCH] Error message in details panel can be huge --- platform/vcs-api/src/com/intellij/vcsUtil/UIVcsUtil.java | 3 ++- .../com/intellij/openapi/vcs/changes/ChangesViewManager.java | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/vcs-api/src/com/intellij/vcsUtil/UIVcsUtil.java b/platform/vcs-api/src/com/intellij/vcsUtil/UIVcsUtil.java index b4c63c922027..cd6727691d9a 100644 --- a/platform/vcs-api/src/com/intellij/vcsUtil/UIVcsUtil.java +++ b/platform/vcs-api/src/com/intellij/vcsUtil/UIVcsUtil.java @@ -15,6 +15,7 @@ */ package com.intellij.vcsUtil; +import com.intellij.openapi.util.text.StringUtil; import com.intellij.ui.SimpleTextAttributes; import com.intellij.util.ui.UIUtil; @@ -31,7 +32,7 @@ public class UIVcsUtil { } public static JPanel errorPanel(final String text, boolean isError) { - final JLabel label = new JLabel(text); + final JLabel label = new JLabel("" + StringUtil.escapeXml(text) + ""); label.setForeground(isError ? SimpleTextAttributes.ERROR_ATTRIBUTES.getFgColor() : UIUtil.getInactiveTextColor()); final JPanel wrapper = new JPanel(new GridBagLayout()); wrapper.add(label, new GridBagConstraints(0,0,1,1,0,0,GridBagConstraints.CENTER, GridBagConstraints.NONE, diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ChangesViewManager.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ChangesViewManager.java index 5ca96686d0b7..299531316917 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ChangesViewManager.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ChangesViewManager.java @@ -280,6 +280,7 @@ public class ChangesViewManager implements ChangesViewI, JDOMExternalizable, Pro final JPanel content = new JPanel(new BorderLayout()); mySplitter = new Splitter(false, 0.5f); + mySplitter.setHonorComponentsMinimumSize(false); final JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myView); final JPanel wrapper = new JPanel(new BorderLayout()); wrapper.add(scrollPane, BorderLayout.CENTER);