rangeList = new ArrayList<IRange>();
}
if (rangeList.isEmpty()) {
// Have at list one range
IRange range = new RangeImpl();
((List<IRange>) rangeList).add(range);
dimension.setRangeList(rangeList);
}
// Fly Scan can have only one range
IRange range = rangeList.get(0);
List<ITrajectory> trajectoryList = range.getTrajectoriesList();
if (trajectoryList == null) {
trajectoryList = new ArrayList<ITrajectory>();
}
int actuatorSize = actuatorList.size();
int trajectorySize = trajectoryList.size();
if (trajectorySize < actuatorSize) {
ITrajectory trajectory = null;
IActuator tmpActuator = null;
for (int i = trajectorySize; i < actuatorSize; i++) {
tmpActuator = actuatorList.get(i);
trajectory = new TrajectoryImpl();
trajectory.setName(tmpActuator.getName());
trajectoryList.add(trajectory);
}
range.setTrajectoriesList(trajectoryList);
}
}
}