From 3768908d4319efbafde211d7a750275659535eae Mon Sep 17 00:00:00 2001 From: Bas Leijdekkers Date: Thu, 1 May 2014 12:42:08 +0200 Subject: [PATCH] IDEA-123831 (Missing Method Count Limit in Inspections under Class Metrics) --- .../src/com/siyeh/ig/BaseInspection.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/BaseInspection.java b/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/BaseInspection.java index 6a389f2206fd..bf57d92b044a 100644 --- a/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/BaseInspection.java +++ b/plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/BaseInspection.java @@ -1,5 +1,5 @@ /* - * Copyright 2003-2013 Dave Griffith, Bas Leijdekkers + * Copyright 2003-2014 Dave Griffith, Bas Leijdekkers * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -119,6 +119,10 @@ public abstract class BaseInspection extends BaseJavaBatchLocalInspectionTool { final Field field = getClass().getField(fieldName); valueField.setValue(field.get(this)); valueField.setColumns(2); + + // hack to work around text field becoming unusably small sometimes when using GridBagLayout + valueField.setMinimumSize(valueField.getPreferredSize()); + UIUtil.fixFormattedField(valueField); final Document document = valueField.getDocument(); document.addDocumentListener(new DocumentAdapter() {