Community
Participate
Working Groups
The old systemType Name String, which is used a lot in RSE, is problematic because it is not translatable and awkward checking for properties. It should be replaced by passing around real IRSESystemType instances everywhere instead. This allows showing getLabel() where needed, accessing getId() for a String instance, getProperty() for specific properties of getName() for backward compatibility.
Work completed, 104 files were affected: [184095][api] Replace String systemTypeName by IRSESystemType everywhere. - Migrate to using system type labels in all UI, and system type IDs when storing Preferences. - Combine NLS messages in rse.core. - Add some API to SystemWidgetHelpers for dealing with system types. - Update and beautify Javadoc. Migration docs for Extenders: ----------------------------- * All methods that used to deal with String systemTypeName, now deal with IRSESystemType instead. Where both variants existed, obsolete methods that dealt with the name only have been removed (e.g. in ISystemRegistry). * In order to get an IRSESystemType when needed, use RSECorePlugin.getDefault().getRegistry().getSystemTypeById("yourId"); for well-known standard IDs, use IRSESystemType.SYSTEMTYPE_LOCAL_ID and similar. * Using a listbox or combo of system types is a little bit more difficult when dealing with translated labels. In order to use the widgets associated with system types, an index needs to be used with those widgets. In order to make using this easier, some new API has been added to SystemWidgetHelpers: IRSESystemType[] getValidSystemTypes(String[] restrictIds) Returns system types that are properly configured, restricted to a list of IDs if requested. The list is returned sorted by Label. void sortSystemTypesByLabel(IRSESystemType[] types) Sorts a list of system types ascending by label. May use an ICU4J collate algorithm for sorting translated names correctly in the future. Note that it sorts the array in place, so clients are responsible for creating a copy of the array when needed. String[] getSystemTypeLabels(IRSESystemType[] types) Returns a list of labels for a list of system types. * Preferences now store information that is indexed by system types, with the system type ID as index instead of the name. This allows translating system type names, but makes old Preferences unusable. Workspaces can not be migrated. Connection data, however, is still using the systemType name. This may be changed. * All code that displays system type names should now use IRSESystemType.getLabel() in order to display the translated name. Going forward, all code that still refers to deprecated IRSESystemType#getName() should be changed to use an ID, Label or Properties of the system type instead.
Work completed.
[target cleanup] 2.0 M7 was the original target milestone for this bug