diff --git a/platform/platform-api/src/com/intellij/ui/components/panels/HorizontalLayout.java b/platform/platform-api/src/com/intellij/ui/components/panels/HorizontalLayout.java index 9652562b6d2a..83ef4d9b0802 100644 --- a/platform/platform-api/src/com/intellij/ui/components/panels/HorizontalLayout.java +++ b/platform/platform-api/src/com/intellij/ui/components/panels/HorizontalLayout.java @@ -112,12 +112,12 @@ public final class HorizontalLayout implements LayoutManager2 { @Override public void addLayoutComponent(String name, Component component) { synchronized (component.getTreeLock()) { - if (name == null || CENTER.equalsIgnoreCase(name)) { - myCenter.add(component); - } - else if (LEFT.equalsIgnoreCase(name)) { + if (name == null || LEFT.equalsIgnoreCase(name)) { myLeft.add(component); } + else if (CENTER.equalsIgnoreCase(name)) { + myCenter.add(component); + } else if (RIGHT.equalsIgnoreCase(name)) { myRight.add(component); } @@ -242,7 +242,7 @@ public final class HorizontalLayout implements LayoutManager2 { if (result == null) { result = new Dimension(); } - else if (aligned) { + else if (aligned && center != null) { int leftWidth = left == null ? 0 : left.width; int rightWidth = right == null ? 0 : right.width; result.width += Math.abs(leftWidth - rightWidth); diff --git a/platform/platform-api/src/com/intellij/ui/components/panels/VerticalLayout.java b/platform/platform-api/src/com/intellij/ui/components/panels/VerticalLayout.java index 7b9fdd0242ba..6d27dc33d132 100644 --- a/platform/platform-api/src/com/intellij/ui/components/panels/VerticalLayout.java +++ b/platform/platform-api/src/com/intellij/ui/components/panels/VerticalLayout.java @@ -112,12 +112,12 @@ public final class VerticalLayout implements LayoutManager2 { @Override public void addLayoutComponent(String name, Component component) { synchronized (component.getTreeLock()) { - if (name == null || CENTER.equalsIgnoreCase(name)) { - myCenter.add(component); - } - else if (TOP.equalsIgnoreCase(name)) { + if (name == null || TOP.equalsIgnoreCase(name)) { myTop.add(component); } + else if (CENTER.equalsIgnoreCase(name)) { + myCenter.add(component); + } else if (BOTTOM.equalsIgnoreCase(name)) { myBottom.add(component); } @@ -242,7 +242,7 @@ public final class VerticalLayout implements LayoutManager2 { if (result == null) { result = new Dimension(); } - else if (aligned) { + else if (aligned && center != null) { int topHeight = top == null ? 0 : top.height; int bottomHeight = bottom == null ? 0 : bottom.height; result.width += Math.abs(topHeight - bottomHeight); diff --git a/platform/platform-impl/src/com/intellij/openapi/options/newEditor/Banner.java b/platform/platform-impl/src/com/intellij/openapi/options/newEditor/Banner.java index 465f16ddd42a..19d5820c6a37 100644 --- a/platform/platform-impl/src/com/intellij/openapi/options/newEditor/Banner.java +++ b/platform/platform-impl/src/com/intellij/openapi/options/newEditor/Banner.java @@ -66,9 +66,9 @@ final class Banner extends JPanel { } else { if (i > 0) { - myLeftPanel.add(HorizontalLayout.LEFT, RelativeFont.HUGE.install(new JLabel("\u203A"))); + myLeftPanel.add(RelativeFont.HUGE.install(new JLabel("\u203A"))); } - myLeftPanel.add(HorizontalLayout.LEFT, RelativeFont.BOLD.install(new JLabel(name))); + myLeftPanel.add(RelativeFont.BOLD.install(new JLabel(name))); } i += 2; } diff --git a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/main/collectors/BytecodeSourceMapper.java b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/main/collectors/BytecodeSourceMapper.java index ce328a9a63b7..26e6f78cf0f1 100644 --- a/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/main/collectors/BytecodeSourceMapper.java +++ b/plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/main/collectors/BytecodeSourceMapper.java @@ -97,7 +97,7 @@ public class BytecodeSourceMapper { buffer.append("Lines mapping:").appendLineSeparator(); Map sorted = new TreeMap(linesMapping); for (Entry entry : sorted.entrySet()) { - buffer.append(entry.getKey()).append(" <-> ").append(entry.getValue()).appendLineSeparator(); + buffer.append(entry.getKey()).append(" <-> ").append(entry.getValue()+ offset_total + 1).appendLineSeparator(); } } diff --git a/plugins/java-decompiler/engine/testData/results/TestClassSimpleBytecodeMapping.dec b/plugins/java-decompiler/engine/testData/results/TestClassSimpleBytecodeMapping.dec index e5dfb1c8a344..9a46f78f0ff0 100644 --- a/plugins/java-decompiler/engine/testData/results/TestClassSimpleBytecodeMapping.dec +++ b/plugins/java-decompiler/engine/testData/results/TestClassSimpleBytecodeMapping.dec @@ -58,12 +58,12 @@ class 'pkg/TestClassSimpleBytecodeMapping' { } Lines mapping: -12 <-> 2 -14 <-> 3 -17 <-> 5 -21 <-> 8 -22 <-> 9 -23 <-> 10 -25 <-> 12 -26 <-> 13 -31 <-> 18 +12 <-> 5 +14 <-> 6 +17 <-> 8 +21 <-> 11 +22 <-> 12 +23 <-> 13 +25 <-> 15 +26 <-> 16 +31 <-> 21