swingx
  1. swingx
  2. SWINGX-1519

Suffix -Ext should be used more consistently

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Trivial Trivial
    • Resolution: Unresolved
    • Affects Version/s: 1.6.4
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      There are several classes and interfaces with the suffix -Ext:

      • AbstractActionExt
      • DefaultTableColumnModelExt
      • MatteBorderExt
      • NumberFormatExt
      • TableColumnExt
      • TableColumnModelExt

      and

      • UIManagerExt (extends Object)
      • NumberEditorExt (extends DefaultCellEditor)

      While in the first group, the classes extend from the class we could expect (those with names without the Ext), in the second group this does not happen so.
      In the case of UIManager and UIManagerExt, they both share some methods while other are exclusive to each and its use might be confusing.
      When talking about NumberEditor and NumberEditorExt, it's impossible to extend the first class as is internal to JTable and has package visibility. Even though the name is inaccurate as it doesn't extend the first class, but in this case the class would rarely be worked.

      Even if "Ext" doesn't properly stand for "Extended" (in a lazier meaning other than that the class extends from the superclass) and would make some sense, this naming policy drives to mistakes and in my opinion might be improved.

      Possible solutions:
      While I'm not sure if accurate (as I didn't follow the development), I'd not like to report without giving any idea:

      • In the case of UIManager, as all the methods are static, a possibility would be adding all the methods in UIManager to the new class, delegating them into UIManager and changing its name to "UIManagerX", "UIManager2", "XUIManager" or any other.
      • In the case of NumberEditor I'd opt for moving it into TableNumberEditor as, although the package already states that it's for a table, there is another NumberEditor for JSpinner.

        Activity

        Hide
        kleopatra added a comment -

        (sorry, didn't see this earlier)

        good observations

        Nevertheless, tend to do nothing about it: as name changes always break backward compatibility that breakage should be weighted against the naming scheme purity.

        Cheers
        Jeanette

        Show
        kleopatra added a comment - (sorry, didn't see this earlier) good observations Nevertheless, tend to do nothing about it: as name changes always break backward compatibility that breakage should be weighted against the naming scheme purity. Cheers Jeanette

          People

          • Assignee:
            Unassigned
            Reporter:
            dsmania
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: