diff options
author | Andrey Loskutov | 2015-02-08 19:23:51 +0000 |
---|---|---|
committer | Andrey Loskutov | 2015-03-24 18:13:25 +0000 |
commit | 320ca4a5621e7f43e1687c3d5be33e4c1106281e (patch) | |
tree | 673b3dfd376287e6ffad16ad49a62e79d6fd0025 | |
parent | c907e7c0369b024ee9781aa5f8c2f6bbbb0104fc (diff) | |
download | eclipse.platform.ui-320ca4a5621e7f43e1687c3d5be33e4c1106281e.tar.gz eclipse.platform.ui-320ca4a5621e7f43e1687c3d5be33e4c1106281e.tar.xz eclipse.platform.ui-320ca4a5621e7f43e1687c3d5be33e4c1106281e.zip |
Bug 334391 - [Contributions] java.lang.IllegalArgumentException in
CustomizePerspectiveDialog
NameAndDescriptionToolTip should not call setText() on Label if the text
is null, and CPD should use getText() from Toolitem's if they have
getToolTipText() == null.
Change-Id: Id8883d367ef143c6c6b70656e527ca9a1f318fc7
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
2 files changed, 7 insertions, 2 deletions
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/cpd/CustomizePerspectiveDialog.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/cpd/CustomizePerspectiveDialog.java index 55c56ff4fe8..7572a521b0c 100644 --- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/cpd/CustomizePerspectiveDialog.java +++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/cpd/CustomizePerspectiveDialog.java @@ -2169,6 +2169,9 @@ public class CustomizePerspectiveDialog extends TrayDialog { if (text == null) { text = item.getToolTipText(); } + if (text == null) { + text = item.getText(); + } if (iconDescriptor == null) { Image image = item.getImage(); if (image != null) { diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/cpd/NameAndDescriptionToolTip.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/cpd/NameAndDescriptionToolTip.java index cf1a5cf282c..6b548e104b8 100644 --- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/cpd/NameAndDescriptionToolTip.java +++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/cpd/NameAndDescriptionToolTip.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2014 IBM Corporation and others. + * Copyright (c) 2000, 2015 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -141,7 +141,9 @@ abstract class NameAndDescriptionToolTip extends ToolTip { GridDataFactory.generate(textLabel, 1, 1); } - textLabel.setText(text); + if (text != null) { + textLabel.setText(text); + } textLabel.setForeground(fg); textLabel.setBackground(bg); return textLabel; |