(localFD *model.FileDescriptor, globalFD *model.FileDescriptor)
| 191 | } |
| 192 | |
| 193 | func (self *typeModelRoot) SolveUnknownModel(localFD *model.FileDescriptor, globalFD *model.FileDescriptor) bool { |
| 194 | |
| 195 | for _, m := range self.unknownModel { |
| 196 | |
| 197 | self.Row = m.row |
| 198 | self.Col = self.fieldTypeCol |
| 199 | |
| 200 | fieldType, isrepeatd, complexType, ok := findFieldType(localFD, globalFD, m.rawFieldType) |
| 201 | if !ok { |
| 202 | return false |
| 203 | } |
| 204 | |
| 205 | // 实在是找不到了, 没辙了 |
| 206 | if fieldType == model.FieldType_None { |
| 207 | log.Errorf("%s, '%s'", i18n.String(i18n.TypeSheet_FieldTypeNotFound), m.rawFieldType) |
| 208 | return false |
| 209 | } |
| 210 | |
| 211 | m.fd.Type = fieldType |
| 212 | m.fd.Complex = complexType |
| 213 | m.fd.IsRepeated = isrepeatd |
| 214 | } |
| 215 | |
| 216 | return true |
| 217 | } |
| 218 | |
| 219 | func findFieldType(localFD *model.FileDescriptor, |
| 220 | globalFD *model.FileDescriptor, |
no test coverage detected