Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Goldthorpe2009-12-03 19:15:19 +0000
committerChris Goldthorpe2009-12-03 19:15:19 +0000
commitb3be9b32054582d561be8fd7c1c72ee63053a0e0 (patch)
tree367c6ddb9df97706d5fc05d2983c6b1febcbc227 /org.eclipse.ui.cheatsheets/src/org
parent9d3f638aa271a2b965babf161522db64b7a8012e (diff)
downloadeclipse.platform.ua-b3be9b32054582d561be8fd7c1c72ee63053a0e0.tar.gz
eclipse.platform.ua-b3be9b32054582d561be8fd7c1c72ee63053a0e0.tar.xz
eclipse.platform.ua-b3be9b32054582d561be8fd7c1c72ee63053a0e0.zip
Bug 287859 – [CheatSheet] description text in cheat sheet selection dialog needs vertical scrollbarv20091203
Diffstat (limited to 'org.eclipse.ui.cheatsheets/src/org')
-rw-r--r--org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/dialogs/CheatSheetCategoryBasedSelectionDialog.java18
1 files changed, 10 insertions, 8 deletions
diff --git a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/dialogs/CheatSheetCategoryBasedSelectionDialog.java b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/dialogs/CheatSheetCategoryBasedSelectionDialog.java
index 1e9c3184b..2e971cd62 100644
--- a/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/dialogs/CheatSheetCategoryBasedSelectionDialog.java
+++ b/org.eclipse.ui.cheatsheets/src/org/eclipse/ui/internal/cheatsheets/dialogs/CheatSheetCategoryBasedSelectionDialog.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002, 2008 IBM Corporation and others.
+ * Copyright (c) 2002, 2009 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
@@ -54,12 +54,12 @@ import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.activities.ITriggerPoint;
import org.eclipse.ui.activities.WorkbenchActivityHelper;
import org.eclipse.ui.cheatsheets.OpenCheatSheetAction;
+import org.eclipse.ui.forms.widgets.ScrolledFormText;
import org.eclipse.ui.internal.cheatsheets.CheatSheetPlugin;
import org.eclipse.ui.internal.cheatsheets.ICheatSheetResource;
import org.eclipse.ui.internal.cheatsheets.Messages;
@@ -88,7 +88,7 @@ public class CheatSheetCategoryBasedSelectionDialog extends TrayDialog //extends
private TreeViewer treeViewer;
- private Text desc;
+ private ScrolledFormText desc;
private Button showAllButton;
@@ -284,8 +284,7 @@ public class CheatSheetCategoryBasedSelectionDialog extends TrayDialog //extends
treeViewer.addSelectionChangedListener(this);
treeViewer.setInput(cheatsheetCategories);
- desc = new Text(sform, SWT.MULTI | SWT.WRAP);
- desc.setEditable(false);
+ desc = new ScrolledFormText(sform, true);
sform.setWeights(new int[] {10, 2});
@@ -531,11 +530,14 @@ public class CheatSheetCategoryBasedSelectionDialog extends TrayDialog //extends
currentSelection = (CheatSheetElement) obj;
}
+ String description;
if (currentSelection != null) {
- desc.setText(currentSelection.getDescription());
- } else {
- desc.setText(""); //$NON-NLS-1$
+ description = currentSelection.getDescription();
+ } else {
+ description = ""; //$NON-NLS-1$
}
+ desc.getFormText().setText(description, false, false);
+ desc.reflow(true);
setOkButton();
}

Back to the top