diff options
| author | Louis Orenstein | 2013-04-29 22:03:10 +0000 |
|---|---|---|
| committer | Jeffrey Overbey | 2013-04-29 22:03:10 +0000 |
| commit | b9a3e818982984769dcf9f672bcc4a08f6d526e5 (patch) | |
| tree | b2fc84476a2f5567f187dd0882060339fe94b2b4 | |
| parent | 6158dd0f2e43a6780c55b4e769d5bbe1e629e7d1 (diff) | |
| download | org.eclipse.photran-b9a3e818982984769dcf9f672bcc4a08f6d526e5.tar.gz org.eclipse.photran-b9a3e818982984769dcf9f672bcc4a08f6d526e5.tar.xz org.eclipse.photran-b9a3e818982984769dcf9f672bcc4a08f6d526e5.zip | |
Bug 399314 - "Add ONLY Clause to Use Statement" needs to be able to
scroll the list of a module's variables and functions
| -rw-r--r-- | org.eclipse.photran.ui.vpg/src/org/eclipse/photran/internal/ui/refactoring/AddOnlyToUseStmtInputPage.java | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/org.eclipse.photran.ui.vpg/src/org/eclipse/photran/internal/ui/refactoring/AddOnlyToUseStmtInputPage.java b/org.eclipse.photran.ui.vpg/src/org/eclipse/photran/internal/ui/refactoring/AddOnlyToUseStmtInputPage.java index 8a3b8b51..eeb88d00 100644 --- a/org.eclipse.photran.ui.vpg/src/org/eclipse/photran/internal/ui/refactoring/AddOnlyToUseStmtInputPage.java +++ b/org.eclipse.photran.ui.vpg/src/org/eclipse/photran/internal/ui/refactoring/AddOnlyToUseStmtInputPage.java @@ -7,6 +7,7 @@ * * Contributors: * UIUC - Initial API and implementation + * Louis Orenstein (Tech-X Corporation) - fix for bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=399314 *******************************************************************************/ package org.eclipse.photran.internal.ui.refactoring; @@ -16,6 +17,7 @@ import java.util.HashMap; import org.eclipse.photran.internal.core.refactoring.AddOnlyToUseStmtRefactoring; import org.eclipse.rephraserengine.ui.refactoring.CustomUserInputPage; import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.ScrolledComposite; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.layout.GridLayout; @@ -26,6 +28,7 @@ import org.eclipse.swt.widgets.Label; /** * * @author Kurt Hendle + * @author Louis Orenstein (Tech-X Corporation) - fix for bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=399314 */ public class AddOnlyToUseStmtInputPage extends CustomUserInputPage<AddOnlyToUseStmtRefactoring> { @@ -40,11 +43,13 @@ public class AddOnlyToUseStmtInputPage extends CustomUserInputPage<AddOnlyToUseS newOnlyList = getRefactoring().getNewOnlyList(); checkList = new ArrayList<Button>(); - Composite top = new Composite(parent, SWT.NONE); - initializeDialogUnits(top); - setControl(top); - - top.setLayout(new GridLayout(1,false)); + // using a ScrolledComposite so the list is scrollable + ScrolledComposite container = new ScrolledComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL); + initializeDialogUnits(container); + setControl(container); + + Composite top = new Composite(container, SWT.NONE); + top.setLayout(new GridLayout(1, false)); Composite group = top; Label lbl = new Label(group, SWT.NONE); @@ -92,5 +97,10 @@ public class AddOnlyToUseStmtInputPage extends CustomUserInputPage<AddOnlyToUseS Label instruct = new Label(top, SWT.NONE); instruct.setText(Messages.AddOnlyToUseStmtInputPage_ClickOKMessage); + + container.setExpandHorizontal(true); + container.setExpandVertical(true); + container.setContent(top); + container.setMinSize(top.computeSize(SWT.DEFAULT, SWT.DEFAULT)); } } |
