(LoadContext context, CDOMObject obj)
| 175 | * target of 5.17, this probably isn't a big deal. |
| 176 | */ |
| 177 | @Override |
| 178 | public boolean process(LoadContext context, CDOMObject obj) |
| 179 | { |
| 180 | ChooseInformation<?> newChoose = obj.get(ObjectKey.CHOOSE_INFO); |
| 181 | String oldChoose = obj.get(StringKey.CHOICE_STRING); |
| 182 | if (newChoose != null && oldChoose != null) |
| 183 | { |
| 184 | Logging.errorPrint("New style CHOOSE " + "and old style CHOOSE both found on " |
| 185 | + obj.getClass().getSimpleName() + ' ' + obj.getKeyName()); |
| 186 | return false; |
| 187 | } |
| 188 | if (newChoose != null) |
| 189 | { |
| 190 | Class<?> chooseClass = newChoose.getReferenceClass(); |
| 191 | List<ChooseSelectionActor<?>> newactors = obj.getListFor(ListKey.NEW_CHOOSE_ACTOR); |
| 192 | if (newactors != null) |
| 193 | { |
| 194 | for (ChooseSelectionActor<?> csa : newactors) |
| 195 | { |
| 196 | if (!chooseClass.equals(csa.getChoiceClass())) |
| 197 | { |
| 198 | Logging.errorPrint("CHOOSE of type " + chooseClass.getName() + " on " |
| 199 | + obj.getClass().getSimpleName() + ' ' + obj.getKeyName() + " had an actor from token " |
| 200 | + csa.getSource() + " that was expecting a " + csa.getChoiceClass().getSimpleName()); |
| 201 | return false; |
| 202 | } |
| 203 | } |
| 204 | } |
| 205 | } |
| 206 | return true; |
| 207 | } |
| 208 | |
| 209 | @Override |
| 210 | public int getPriority() |
nothing calls this directly
no test coverage detected