mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-14 20:45:22 +02:00
[231828] TVT34:TCT182: PLK: Truncation in "Rename resource" window
https://bugs.eclipse.org/bugs/show_bug.cgi?id=231828
This commit is contained in:
parent
6a9d129c1d
commit
0442bb150d
1 changed files with 11 additions and 8 deletions
|
@ -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
|
* 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
|
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
@ -13,6 +13,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
|
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
|
||||||
* Rupen Mardirossian (IBM) - [208435] When validating name, check for previously used names for multiple renaming instances
|
* Rupen Mardirossian (IBM) - [208435] When validating name, check for previously used names for multiple renaming instances
|
||||||
|
* David Dykstal (IBM) - [231828] make rename dialog a bit wider
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.ui.dialogs;
|
package org.eclipse.rse.ui.dialogs;
|
||||||
|
@ -43,6 +44,7 @@ import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
|
||||||
import org.eclipse.rse.ui.view.SystemAdapterHelpers;
|
import org.eclipse.rse.ui.view.SystemAdapterHelpers;
|
||||||
import org.eclipse.swt.events.ModifyEvent;
|
import org.eclipse.swt.events.ModifyEvent;
|
||||||
import org.eclipse.swt.events.ModifyListener;
|
import org.eclipse.swt.events.ModifyListener;
|
||||||
|
import org.eclipse.swt.layout.GridData;
|
||||||
import org.eclipse.swt.widgets.Button;
|
import org.eclipse.swt.widgets.Button;
|
||||||
import org.eclipse.swt.widgets.Composite;
|
import org.eclipse.swt.widgets.Composite;
|
||||||
import org.eclipse.swt.widgets.Control;
|
import org.eclipse.swt.widgets.Control;
|
||||||
|
@ -89,7 +91,8 @@ public class SystemRenameSingleDialog extends SystemPromptDialog
|
||||||
private Composite renameGroup;
|
private Composite renameGroup;
|
||||||
|
|
||||||
private Text newName;
|
private Text newName;
|
||||||
private String promptLabel, promptTip;
|
private String promptLabel;
|
||||||
|
private String promptTip;
|
||||||
private String newNameString;
|
private String newNameString;
|
||||||
private String inputName = ""; //$NON-NLS-1$
|
private String inputName = ""; //$NON-NLS-1$
|
||||||
private Label resourceTypePrompt, resourceTypeValue, verbiageLabel, renameLabel;
|
private Label resourceTypePrompt, resourceTypeValue, verbiageLabel, renameLabel;
|
||||||
|
@ -273,8 +276,7 @@ public class SystemRenameSingleDialog extends SystemPromptDialog
|
||||||
renameGroup = SystemWidgetHelpers.createComposite(composite, nbrRenameColumns);
|
renameGroup = SystemWidgetHelpers.createComposite(composite, nbrRenameColumns);
|
||||||
|
|
||||||
// RESOURCE TYPE
|
// RESOURCE TYPE
|
||||||
resourceTypePrompt = SystemWidgetHelpers.createLabel(
|
resourceTypePrompt = SystemWidgetHelpers.createLabel(renameGroup, SystemResources.RESID_SIMPLE_RENAME_RESOURCEPROMPT_LABEL);
|
||||||
renameGroup, SystemResources.RESID_SIMPLE_RENAME_RESOURCEPROMPT_LABEL);
|
|
||||||
resourceTypeValue = SystemWidgetHelpers.createLabel(renameGroup, ""); //$NON-NLS-1$
|
resourceTypeValue = SystemWidgetHelpers.createLabel(renameGroup, ""); //$NON-NLS-1$
|
||||||
resourceTypeValue.setToolTipText(SystemResources.RESID_SIMPLE_RENAME_RESOURCEPROMPT_TOOLTIP);
|
resourceTypeValue.setToolTipText(SystemResources.RESID_SIMPLE_RENAME_RESOURCEPROMPT_TOOLTIP);
|
||||||
|
|
||||||
|
@ -285,13 +287,14 @@ public class SystemRenameSingleDialog extends SystemPromptDialog
|
||||||
String labelText = copyCollisionMode ? SystemResources.RESID_COLLISION_RENAME_LABEL : SystemResources.RESID_SIMPLE_RENAME_PROMPT_LABEL;
|
String labelText = copyCollisionMode ? SystemResources.RESID_COLLISION_RENAME_LABEL : SystemResources.RESID_SIMPLE_RENAME_PROMPT_LABEL;
|
||||||
labelText = SystemWidgetHelpers.appendColon(labelText);
|
labelText = SystemWidgetHelpers.appendColon(labelText);
|
||||||
renameLabel = SystemWidgetHelpers.createLabel(renameGroup, labelText);
|
renameLabel = SystemWidgetHelpers.createLabel(renameGroup, labelText);
|
||||||
newName = SystemWidgetHelpers.createTextField(renameGroup, null);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
renameLabel = SystemWidgetHelpers.createLabel(renameGroup, promptLabel);
|
renameLabel = SystemWidgetHelpers.createLabel(renameGroup, promptLabel);
|
||||||
|
}
|
||||||
newName = SystemWidgetHelpers.createTextField(renameGroup, null);
|
newName = SystemWidgetHelpers.createTextField(renameGroup, null);
|
||||||
if (promptTip != null)
|
((GridData)newName.getLayoutData()).widthHint = 300; // make this wider than usual so error messages are not truncated
|
||||||
|
if (promptTip != null) {
|
||||||
newName.setToolTipText(promptTip);
|
newName.setToolTipText(promptTip);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue