parent
249bc2c6bc
commit
acc8ceec76
Binary file not shown.
|
@ -78,17 +78,16 @@ public class PinoutLogic {
|
||||||
classList.set(index, listPin.getPinTsName());
|
classList.set(index, listPin.getPinTsName());
|
||||||
}
|
}
|
||||||
for (Map.Entry<String, ArrayList<String>> kv : names.entrySet()) {
|
for (Map.Entry<String, ArrayList<String>> kv : names.entrySet()) {
|
||||||
String pinName = kv.getKey();
|
PinType namePinType = PinType.find(kv.getKey());
|
||||||
PinType namePinType = PinType.find(pinName);
|
|
||||||
String outputEnumName = namePinType.getOutputEnumName();
|
String outputEnumName = namePinType.getOutputEnumName();
|
||||||
String pinType = namePinType.getPinType();
|
String pinType = namePinType.getPinType();
|
||||||
String nothingName = namePinType.getNothingName();
|
String nothingName = namePinType.getNothingName();
|
||||||
EnumsReader.EnumState enumList = state.enumsReader.getEnums().get(pinType);
|
EnumsReader.EnumState enumList = state.enumsReader.getEnums().get(pinType);
|
||||||
EnumPair pair = enumToOptionsList(nothingName, enumList, kv.getValue());
|
EnumPair pair = enumToOptionsList(nothingName, enumList, kv.getValue());
|
||||||
if (pair.getSimpleForm().isEmpty())
|
if (pair.getSimpleForm().length() > 0) {
|
||||||
throw new IllegalStateException("No simple form for " + pinName);
|
registry.register(outputEnumName + ENUM_SUFFIX, pair.getShorterForm());
|
||||||
registry.register(outputEnumName + ENUM_SUFFIX, pair.getShorterForm());
|
parseState.addDefinition(outputEnumName + ENUM_SUFFIX, pair.getShorterForm(), Definition.OverwritePolicy.IgnoreNew);
|
||||||
parseState.addDefinition(outputEnumName + ENUM_SUFFIX, pair.getShorterForm(), Definition.OverwritePolicy.IgnoreNew);
|
}
|
||||||
registry.register(outputEnumName + FULL_JAVA_ENUM, pair.getSimpleForm());
|
registry.register(outputEnumName + FULL_JAVA_ENUM, pair.getSimpleForm());
|
||||||
parseState.addDefinition(outputEnumName + FULL_JAVA_ENUM, pair.getSimpleForm(), Definition.OverwritePolicy.IgnoreNew);
|
parseState.addDefinition(outputEnumName + FULL_JAVA_ENUM, pair.getSimpleForm(), Definition.OverwritePolicy.IgnoreNew);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue