diff --git a/discovery/org.eclipse.rse.discovery/plugin.properties b/discovery/org.eclipse.rse.discovery/plugin.properties index 100d92ac3ba..c0d4d244615 100644 --- a/discovery/org.eclipse.rse.discovery/plugin.properties +++ b/discovery/org.eclipse.rse.discovery/plugin.properties @@ -12,4 +12,7 @@ pluginName = Target Management Service Discovery RSE Plug-in providerName = Eclipse.org +DiscoverySystemLabel=Discovery +DiscoverySystemDescription=Discovery + NewConnectionWizard.discovery.name=Service Discovery Wizard diff --git a/discovery/org.eclipse.rse.discovery/plugin.xml b/discovery/org.eclipse.rse.discovery/plugin.xml index 7bae160553d..f0658760e12 100644 --- a/discovery/org.eclipse.rse.discovery/plugin.xml +++ b/discovery/org.eclipse.rse.discovery/plugin.xml @@ -29,8 +29,9 @@ Contributors: diff --git a/rse/examples/org.eclipse.rse.examples.daytime/plugin.properties b/rse/examples/org.eclipse.rse.examples.daytime/plugin.properties index 69c48bad62d..4161adb2164 100644 --- a/rse/examples/org.eclipse.rse.examples.daytime/plugin.properties +++ b/rse/examples/org.eclipse.rse.examples.daytime/plugin.properties @@ -12,6 +12,7 @@ pluginName = RSE Daytime providerName = Eclipse.org +DaytimeSystemLabel=Daytime DaytimeSystemDescription=Daytime System Type Files=Files diff --git a/rse/examples/org.eclipse.rse.examples.daytime/plugin.xml b/rse/examples/org.eclipse.rse.examples.daytime/plugin.xml index 2f8514345a8..61b7ad5b71d 100644 --- a/rse/examples/org.eclipse.rse.examples.daytime/plugin.xml +++ b/rse/examples/org.eclipse.rse.examples.daytime/plugin.xml @@ -14,6 +14,7 @@ Martin Oberhuber (Wind River) - initial API and implementation - The display name for the system type, such as "Solaris". This name is also currently used when referencing the system type in filters, subsystem configurations and similar, therefore it is not translatable. Future versions of RSE may change this and reference the systemType id instead of the name. + The display name for the system type, such as "Solaris". This name is also currently used as internal identifier when referencing the system type in filters, subsystem configurations and similar, therefore it is not translatable. Future versions of RSE may change this and reference the systemType id instead of the name. +<p> +<b>Deprecated:</b> Use system type id to specify a unique identifier and system type label to specify a translatable UI label. <p> RSE pre-defines a number of system types, although they may not appear unless a subsystem configuration is registered against that type. These are the supplied system types: <ul> @@ -77,6 +79,19 @@ RSE pre-defines a number of system types, although they may not appear unless a </ul> </p> + + + + + + + + + A label used in the UI to identify the system type besides the system type icon. + + + + @@ -123,7 +138,6 @@ If not specified, a default icon will be used by RSE. A semicolon separated list of fully qualified subsystem configuration ids this system type wants to get registered against. <p> <b>Note:</b> The list specified here does not imply that the corresponding subsystem configurations exist. The list contains only possibilites, not requirements. - diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSESystemType.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSESystemType.java index 553dfb6afac..7f63092220e 100644 --- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSESystemType.java +++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/IRSESystemType.java @@ -83,9 +83,18 @@ public interface IRSESystemType extends IAdaptable { */ public String getId(); + /** + * Returns the translatable label for use in the UI. + * + * @return The UI label or null if not set. + */ + public String getLabel(); + /** * Returns the name of the system type. * @return the name of the system type + * + * @deprecated Use {@link #getId()} for accessing the unique id or {@link #getLabel()} for the UI label. */ public String getName(); diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/internal/RSECoreRegistry.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/internal/RSECoreRegistry.java index 47046f92522..0e0dcff32c4 100644 --- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/internal/RSECoreRegistry.java +++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/internal/RSECoreRegistry.java @@ -138,13 +138,13 @@ public class RSECoreRegistry implements IRSECoreRegistry { IConfigurationElement element = elements[i]; if (element.getName().equals(ELEMENT_SYTEM_TYPE)) { - RSESystemType type = new RSESystemType(element); + IRSESystemType type = new RSESystemType(element); if (!typeIds.contains(type.getId())) { types.add(type); typeIds.add(type.getId()); String message = "Successfully registered RSE system type ''{0}'' (id = ''{1}'')."; //$NON-NLS-1$ - message = MessageFormat.format(message, new Object[] { type.getName(), type.getId() }); + message = MessageFormat.format(message, new Object[] { type.getLabel(), type.getId() }); RSECorePlugin.getDefault().getLogger().logInfo(message); } else { String message = "RSE system type contribution skipped. Non-unique system type id (plugin: {0}, id: {1})."; //$NON-NLS-1$ @@ -171,7 +171,7 @@ public class RSECoreRegistry implements IRSECoreRegistry { typeIds.add(type.getId()); String message = "Successfully registered RSE system type ''{0}'' (id = ''{1}'')."; //$NON-NLS-1$ - message = MessageFormat.format(message, new Object[] { type.getName(), type.getId() }); + message = MessageFormat.format(message, new Object[] { type.getLabel(), type.getId() }); RSECorePlugin.getDefault().getLogger().logInfo(message); } else { String message = "RSE system type contribution skipped. Non-unique system type id (plugin: {0}, id: {1})."; //$NON-NLS-1$ diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/internal/RSESystemType.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/internal/RSESystemType.java index 42dc271f250..154399cb2a1 100644 --- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/internal/RSESystemType.java +++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/internal/RSESystemType.java @@ -33,6 +33,7 @@ public class RSESystemType implements IRSESystemType { private static final String ATTR_ID = "id"; //$NON-NLS-1$ private static final String ATTR_NAME = "name"; //$NON-NLS-1$ + private static final String ATTR_LABEL = "label"; //$NON-NLS-1$ private static final String ATTR_DESCRIPTION = "description"; //$NON-NLS-1$ private static final String ATTR_ICON = "icon"; //$NON-NLS-1$ private static final String ATTR_ICONLIVE = "iconLive"; //$NON-NLS-1$ @@ -42,6 +43,7 @@ public class RSESystemType implements IRSESystemType { private String id = null; private String name = null; + private String label = null; private String description = null; private Map properties; private Bundle definingBundle = null; @@ -55,6 +57,7 @@ public class RSESystemType implements IRSESystemType { id = element.getAttribute(ATTR_ID); name = element.getAttribute(ATTR_NAME); + label = element.getAttribute(ATTR_LABEL); description = element.getAttribute(ATTR_DESCRIPTION); loadProperties(element); @@ -105,6 +108,15 @@ public class RSESystemType implements IRSESystemType { return id; } + /* (non-Javadoc) + * @see org.eclipse.rse.core.IRSESystemType#getLabel() + */ + public String getLabel() { + // fallback to the id if the label should be null. + if (label == null) return getId(); + return label; + } + /* (non-Javadoc) * @see org.eclipse.rse.core.IRSESystemType#getName() */ diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/plugin.properties b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/plugin.properties index 3fb9e5d6384..3a596f447a4 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/plugin.properties +++ b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/plugin.properties @@ -21,6 +21,7 @@ pluginName = RSE FTP Files providerName = Eclipse.org +FtpSystemLabel=FTP Only FtpSystemDescription=Connection for FTP access to remote systems Files=Files diff --git a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/plugin.xml b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/plugin.xml index 36c51e35d04..cfd8d7d445d 100644 --- a/rse/plugins/org.eclipse.rse.subsystems.files.ftp/plugin.xml +++ b/rse/plugins/org.eclipse.rse.subsystems.files.ftp/plugin.xml @@ -19,6 +19,7 @@ Martin Oberhuber (Wind River) - add FTP Only system type 0) { - newConnText = systemTypes[0].getName() + " ..."; //$NON-NLS-1$ + newConnText = systemTypes[0].getLabel() + " ..."; //$NON-NLS-1$ } } diff --git a/rse/plugins/org.eclipse.rse.ui/plugin.properties b/rse/plugins/org.eclipse.rse.ui/plugin.properties index 18baeceb722..6612afff92a 100644 --- a/rse/plugins/org.eclipse.rse.ui/plugin.properties +++ b/rse/plugins/org.eclipse.rse.ui/plugin.properties @@ -1,5 +1,5 @@ ################################################################################ -# Copyright (c) 2000, 2006 IBM Corporation. All rights reserved. +# Copyright (c) 2000, 2007 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 @@ -11,7 +11,8 @@ # Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. # # Contributors: -# {Name} (company) - description of contribution. +# Uwe Stieber (Wind River) - [174966] IRSESystemType should have a getLabel() +# method for translatable label. ################################################################################ # NLS_MESSAGEFORMAT_NONE @@ -28,16 +29,21 @@ extPoint.remoteSystemsViewPreferencesActions = Remote Systems View Preferences A extPoint.compile = Remote Compile Commands extPoint.mountPathMappers = Mount Path Mappers -#systemType.iseries = iSeries native operating system (OS/400 or i5/OS) -#systemType.iseries.PASE = PASE on iSeries -#systemType.zseries = zSeries native operating system (z/OS) -systemType.windows = Any version of Microsoft Windows -systemType.unix = Any distribution of Unix -#systemType.aix = IBM AIX operating system -systemType.linux = Any distribution of Linux -#systemType.powerlinux = Linux running on PowerPC hardware -#systemType.zlinux = Linux running on zSeries hardware -systemType.local = Local file system on this computer +systemType.windows.label=Windows +systemType.unix.label=Unix +systemType.linux.label=Linux +systemType.local.label=Local + +#systemType.iseries.description = iSeries native operating system (OS/400 or i5/OS) +#systemType.iseries.PASE.description = PASE on iSeries +#systemType.zseries.description = zSeries native operating system (z/OS) +systemType.windows.description = Any version of Microsoft Windows +systemType.unix.description = Any distribution of Unix +#systemType.aix.description = IBM AIX operating system +systemType.linux.description = Any distribution of Linux +#systemType.powerlinux.description = Linux running on PowerPC hardware +#systemType.zlinux.description = Linux running on zSeries hardware +systemType.local.description = Local file system on this computer #PropertyPage.Info = Info #PropertyPage.Team = Team diff --git a/rse/plugins/org.eclipse.rse.ui/plugin.xml b/rse/plugins/org.eclipse.rse.ui/plugin.xml index 7d5165a2ee1..04b970480c0 100644 --- a/rse/plugins/org.eclipse.rse.ui/plugin.xml +++ b/rse/plugins/org.eclipse.rse.ui/plugin.xml @@ -183,61 +183,69 @@ Contributors: - + - + iconLive="icons/full/obj16/systemlinuxlive_obj.gif" + id="org.eclipse.rse.systemtype.linux" + label="%systemType.linux.label" + name="Linux"/> - + - + diff --git a/rse/tests/org.eclipse.rse.tests/plugin.properties b/rse/tests/org.eclipse.rse.tests/plugin.properties index 52aec4ad1a9..c8d01f8edea 100644 --- a/rse/tests/org.eclipse.rse.tests/plugin.properties +++ b/rse/tests/org.eclipse.rse.tests/plugin.properties @@ -21,4 +21,5 @@ testSubSystem2Description = Test Subsystem 2 testSubSystem3Name = Tests3 testSubSystem3Description = Test Subsystem 3 +testSystemTypeLabel = Tests Only testSystemTypeDescription = RSE Test plugin internal system type diff --git a/rse/tests/org.eclipse.rse.tests/plugin.xml b/rse/tests/org.eclipse.rse.tests/plugin.xml index 78300a7f93d..f6468bab3fa 100644 --- a/rse/tests/org.eclipse.rse.tests/plugin.xml +++ b/rse/tests/org.eclipse.rse.tests/plugin.xml @@ -61,6 +61,7 @@