diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemPropertyResources.properties b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemPropertyResources.properties index beec92669b5..32bf4a59142 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemPropertyResources.properties +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/SystemPropertyResources.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2006, 2007 IBM Corporation and others. +# Copyright (c) 2006, 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 @@ -12,7 +12,7 @@ # Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. # # Contributors: -# {Name} (company) - description of contribution. +# Martin Oberhuber (Wind River) - [195399] Improve String display for default port 0 ############################################################################### ############################################################## @@ -31,7 +31,7 @@ RESID_PROPERTY_DESCRIPTION_TOOLTIP=Description of resource RESID_TERM_NOTAPPLICABLE=Not applicable RESID_TERM_NOTAVAILABLE=Not available -RESID_PORT_DYNAMICSELECT=(First-available) +RESID_PORT_DYNAMICSELECT={0} (Default or first available) RESID_PROPERTY_INHERITED=(Inherited) RESID_PROPERTY_FILTERTYPE_VALUE=Remote system filter diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewSubSystemAdapter.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewSubSystemAdapter.java index a4b003c6f4f..0515ef7ce4f 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewSubSystemAdapter.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/SystemViewSubSystemAdapter.java @@ -18,6 +18,7 @@ * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread * David Dykstal (IBM) - [217556] remove service subsystem types + * Martin Oberhuber (Wind River) - [195399] Improve String display for default port 0 ********************************************************************************/ package org.eclipse.rse.internal.ui.view; @@ -41,6 +42,7 @@ import org.eclipse.rse.ui.validators.ISystemValidator; import org.eclipse.rse.ui.validators.ValidatorPortInput; import org.eclipse.rse.ui.view.AbstractSystemViewAdapter; import org.eclipse.rse.ui.view.ISystemPropertyConstants; +import org.eclipse.rse.ui.view.SystemAdapterHelpers; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.views.properties.IPropertyDescriptor; import org.eclipse.ui.views.properties.PropertyDescriptor; @@ -326,7 +328,7 @@ public class SystemViewSubSystemAdapter extends AbstractSystemViewAdapter if (!notApplicable) { data.setInheritedValue("0"); - data.setInheritedDisplayString(SystemResources.RESID_PORT_DYNAMICSELECT)); + data.setInheritedDisplayString(NLS.bind(SystemPropertyResources.RESID_PORT_DYNAMICSELECT, "0")); //$NON-NLS-1$ data.setIsLocal(iPort != 0); } data.setNotApplicable(notApplicable); @@ -737,7 +739,7 @@ public class SystemViewSubSystemAdapter extends AbstractSystemViewAdapter public String getInputMementoHandle(Object element) { Object parent = getParent(element); - return getSystemViewElementAdapter(parent).getInputMementoHandle(parent) + MEMENTO_DELIM + getMementoHandle(element); + return SystemAdapterHelpers.getViewAdapter(parent, getViewer()).getInputMementoHandle(parent) + MEMENTO_DELIM + getMementoHandle(element); } /** * Return a short string to uniquely identify the type of resource. Eg "conn" for connection. diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemSubSystemPropertyPageCoreForm.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemSubSystemPropertyPageCoreForm.java index 39169e9d951..12d81017547 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemSubSystemPropertyPageCoreForm.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/propertypages/SystemSubSystemPropertyPageCoreForm.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) - [186748] Move ISubSystemConfigurationAdapter from UI/rse.core.subsystems.util + * Martin Oberhuber (Wind River) - [195399] Improve String display for default port 0 ********************************************************************************/ package org.eclipse.rse.ui.propertypages; @@ -176,7 +177,7 @@ public class SystemSubSystemPropertyPageCoreForm extends AbstractSystemSubSystem else { textPort.setLocalText(localPort); - textPort.setInheritedText("0 "+SystemResources.RESID_PORT_DYNAMICSELECT)); + textPort.setInheritedText(NLS.bind(SystemPropertyResources.RESID_PORT_DYNAMICSELECT, new Integer(0))); textPort.setLocal(iPort != 0); } } diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemPortPrompt.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemPortPrompt.java index e8ec6cd9479..e07ab596176 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemPortPrompt.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/widgets/SystemPortPrompt.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2002, 2007 IBM Corporation and others. + * 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 @@ -12,10 +12,11 @@ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. * * Contributors: - * {Name} (company) - description of contribution. + * Martin Oberhuber (Wind River) - [195399] Improve String display for default port 0 *******************************************************************************/ package org.eclipse.rse.ui.widgets; +import org.eclipse.osgi.util.NLS; import org.eclipse.rse.internal.ui.SystemPropertyResources; import org.eclipse.rse.internal.ui.SystemResources; import org.eclipse.rse.services.clientserver.messages.SystemMessage; @@ -189,7 +190,7 @@ public class SystemPortPrompt else // editable { textPort.setLocalText(localPort); - textPort.setInheritedText("0 "+SystemPropertyResources.RESID_PORT_DYNAMICSELECT); //$NON-NLS-1$ + textPort.setInheritedText(NLS.bind(SystemPropertyResources.RESID_PORT_DYNAMICSELECT, new Integer(0))); textPort.setLocal(iPort != 0); } }