if (structuredDocumentRegion.isDeleted()) {
return;
}
ITextRegionList textRegions = structuredDocumentRegion.getRegions();
IFXCtrlClass fxCtrl = null;
for (int i = 0; i < textRegions.size(); i++) {
ITextRegion textRegion = textRegions.get(i);
if (textRegion.getType() == DOMRegionContext.XML_TAG_OPEN) {
IndexedRegion treeNode = getNode(document, structuredDocumentRegion.getStartOffset(textRegion));
if (treeNode == null) {
return;
}
IDOMNode node = (IDOMNode) treeNode;
if (fxCtrl == null) {
fxCtrl = getController(node);
}
if( fxCtrl == null ) {
continue;
}
IFXClass e = computeTagNameHelp(node);
if (e != null) {
NamedNodeMap nnm = node.getAttributes();
Map<String, IFXProperty> props = e.getAllProperties();
for (int j = 0; j < nnm.getLength(); j++) {
Node attribute = nnm.item(j);
if (attribute.getNodeName().equals("fx:id")) {
IFXCtrlField f = fxCtrl.getAllFields().get(attribute.getNodeValue());
IType type = e.getType();
if( f != null ) {
} else {
String fielname = attribute.getNodeValue();
FXMLValidationMessage message = new FXMLValidationMessage(IMessage.ERROR_AND_WARNING, "FXMLValidator.unknownControllerField", fxCtrl.getSimpleName(), fielname);
IDOMAttr domAttr = (IDOMAttr) attribute;
message.setLength(getAttributeLength(structuredDocumentRegion, domAttr));
message.setOffset(domAttr.getStartOffset());
UnknownControllerFieldQuickAssist processor = new UnknownControllerFieldQuickAssist(fielname, type, fxCtrl);
message.setAttribute(IQuickAssistProcessor.class.getName(), processor);
reporter.addMessage(this, message);
}
} else {
IFXProperty p = props.get(attribute.getNodeName());
if (p instanceof IFXEventHandlerProperty) {
IFXCtrlEventMethod evtMethod = fxCtrl.getAllEventMethods().get(attribute.getNodeValue().substring(1));
if (evtMethod == null) {
String methodName = nnm.item(j).getNodeValue().substring(1);
FXMLValidationMessage message = new FXMLValidationMessage(IMessage.HIGH_SEVERITY, "FXMLValidator.unknownControllerMethod", fxCtrl.getSimpleName(), methodName);
IDOMAttr domAttr = (IDOMAttr) attribute;
message.setLength(getAttributeLength(structuredDocumentRegion, domAttr));
message.setOffset(domAttr.getStartOffset());