From 9c88ab6bba8734b73fc83b92f213ff3b378365e3 Mon Sep 17 00:00:00 2001 From: David Dykstal Date: Thu, 15 May 2008 17:54:00 +0000 Subject: [PATCH] [232318] TVT34:TCT290: Button truncation in RSE "Work with compile commands" https://bugs.eclipse.org/bugs/show_bug.cgi?id=232318 --- .../rse/ui/widgets/SystemEditPaneStateMachine.java | 10 ++++++---- .../compile/SystemWorkWithCompileCommandsDialog.java | 4 +++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemEditPaneStateMachine.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemEditPaneStateMachine.java index ebea58ec15d..309496f9ea6 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemEditPaneStateMachine.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemEditPaneStateMachine.java @@ -1,5 +1,5 @@ /******************************************************************************** - * Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved. + * Copyright (c) 2002, 2008 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 http://www.eclipse.org/legal/epl-v10.html @@ -12,6 +12,7 @@ * * Contributors: * Martin Oberhuber (Wind River) - [183165] Do not implement constant interfaces + * David Dykstal (IBM) - [232318] force layout and repaint after changing labels ********************************************************************************/ package org.eclipse.rse.ui.widgets; @@ -25,9 +26,7 @@ import org.eclipse.swt.widgets.Composite; /** - * @author coulthar - * - * This class attempts to encapsulate the states an edit page (with apply/reset buttons) + * This class encapsulates the states an edit page (with apply/reset buttons) * can go through and handle managing the state transitions. For example, it manages * the enabled/disabled state of the apply/reset buttons. *

@@ -346,6 +345,9 @@ public class SystemEditPaneStateMachine //} } } + Composite parent = applyButton.getParent(); + parent.layout(); + parent.update(); } } diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemWorkWithCompileCommandsDialog.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemWorkWithCompileCommandsDialog.java index 85e20dece38..b48d005a548 100644 --- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemWorkWithCompileCommandsDialog.java +++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemWorkWithCompileCommandsDialog.java @@ -11,6 +11,7 @@ * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands * API to the user actions plugin + * David Dykstal (IBM) - [232318] fixing layout problems with button composite *******************************************************************************/ package org.eclipse.rse.internal.useractions.ui.compile; @@ -243,15 +244,16 @@ public class SystemWorkWithCompileCommandsDialog extends SystemPromptDialog impl // now populate bottom of right-side composite with apply/revert buttons within their own composite int nbrColumns_buttonComposite = 3; Composite applyResetButtonComposite = SystemWidgetHelpers.createFlushComposite(rightSideComposite, nbrColumns_buttonComposite); - ((GridData) applyResetButtonComposite.getLayoutData()).horizontalIndent = 200; // shift buttons to the right // now populate the buttons composite with apply and revert buttons Label filler = SystemWidgetHelpers.createLabel(applyResetButtonComposite, ""); //$NON-NLS-1$ ((GridData) filler.getLayoutData()).grabExcessHorizontalSpace = true; ((GridData) filler.getLayoutData()).horizontalAlignment = GridData.FILL; applyButton = SystemWidgetHelpers.createPushButton(applyResetButtonComposite, this, SystemUDAResources.RESID_WWCOMPCMDS_BUTTON_APPLY_LABEL, SystemUDAResources.RESID_WWCOMPCMDS_BUTTON_APPLY_TOOLTIP); + ((GridData) applyButton.getLayoutData()).grabExcessHorizontalSpace = false; revertButton = SystemWidgetHelpers.createPushButton(applyResetButtonComposite, this, SystemUDAResources.RESID_WWCOMPCMDS_BUTTON_REVERT_LABEL, SystemUDAResources.RESID_WWCOMPCMDS_BUTTON_REVERT_TOOLTIP); + ((GridData) revertButton.getLayoutData()).grabExcessHorizontalSpace = false; // now add a spacer to soak up left-over height... addGrowableFillerLine(rightSideComposite, 1); // create state machine to manage edit pane