コード例 #1
0
 public static I18nValidationComponent createI18nValidationComponent(IDOMAttr attr) {
   I18nValidationComponent component = new I18nValidationComponent();
   component.setStartOffSet(attr.getValueRegionStartOffset() + 1);
   component.setLength(attr.getValueRegionText().length() - 2);
   if (attr.getStructuredDocument() == null) {
     return null;
   }
   component.setLine(attr.getStructuredDocument().getLineOfOffset(component.getStartOffSet()) + 1);
   component.createValidationMessage();
   component.createMessageParams();
   component.setInValidString(attr.getNodeValue());
   return component;
 }
コード例 #2
0
 public static I18nValidationComponent createI18nValidationComponent(IDOMText element) {
   I18nValidationComponent component = new I18nValidationComponent();
   component.setStartOffSet(element.getStartOffset());
   component.setLength(element.getLength());
   if (element.getStructuredDocument() == null) {
     return null;
   }
   component.setLine(
       element.getStructuredDocument().getLineOfOffset(component.getStartOffSet()) + 1);
   component.createValidationMessage();
   component.createMessageParams();
   component.setInValidString(element.getNodeValue());
   return component;
 }