Clean up and refactoring
The main goal is to enhance code readability. Proceed in the following order. It's worth to commit after each step.
-
Rename classes, so the names better show their functionality
- PV -> BeamParameter
- TP -> TimingParameter
- RFLTableModel -> CavityTableModel
- Delete class JTableButtonRenderer, we don't use it, correct?
-
Parametrize ParameterModel class
This is the same thing that we've done to CellRenderer. See #20 (closed). The ParameterModel will be defined as:
public class ParameterModel<T extends PV> extends AbstractTableModel implements RowList<T>
and all PVs will be replaced by T in the class code.
This code from **RFLDocument**
private final ParameterModel pvdata = new ParameterModel();
private final TPModel tpdata = new TPModel();
will be replaced with following:
private final ParameterModel<BeamParameter> pvdata = new ParameterModel<>();
private final ParameterModel<TimingParameter> tpdata = new ParameterModel<>();
There will be no need for TPModel class after that. Remove it.
-
Move connectivity related classes into separate package xal.app.rflearning.epics
These include: UpdatingPV, ProxyPV, TestUpdatingPV, ConnectionChannelTest, ConnectionTest, ConnectJCATest.
While it seems easy and you can use Eclipse refactoring for it there will be some caveats because the package visibility will be not enough. So you have to make some of the classes public. The ultimate goal is to have just one public class UpdatingPV.