// check if labelfile exists
try {
IFile labelFile = designHelper.getLabelFile(labelFilename);
if (labelFile == null || !labelFile.exists()) {
try {
IRegion attributeRegion = tmlInfo.getAttributeValueRegion("file");
if (attributeRegion != null) {
charStart = attributeRegion.getOffset();
charEnd = charStart + attributeRegion.getLength();
}
} catch (BadLocationException e) {
}
MarkerFactory.createErrorMarker(getMarkerID(), file, charStart, charEnd, "Labelfile '" + labelFilename + "' does not exist.", markerAttributes);
}
} catch (CoreException e1) {
}
}
Set<String> labelKeys = designHelper.getLabelKeys(labelFilename);
if (!labelKeys.contains(labelKey)) {
try {
IRegion attributeRegion = tmlInfo.getAttributeValueRegion("key");
if (attributeRegion != null) {
charStart = attributeRegion.getOffset();
charEnd = charStart + attributeRegion.getLength();
}
} catch (BadLocationException e) {
}
if (labelFilename.equalsIgnoreCase("general")) {
MarkerFactory.createWarningMarker(getMarkerID(), file, charStart, charEnd, "Cannot resolve label for key '" + labelKey + "'.", markerAttributes);