/** * parses a comment for annotations * @param newComment */ private String parseAnnotations(String string) { getAnnotations().clear(); if(string==null) return string; Matcher matcher = ANNOTATION_PARSER.matcher(string); String remainder = string; while(matcher.find()) { PropertyAnnotation annotation = PropertiesFactory.eINSTANCE.createPropertyAnnotation(); parseAnnotationValues(annotation,matcher.group(3)); annotation.setName(matcher.group(1)); getAnnotations().add(annotation); } return remainder; }
annotation.setName(PropertyAnnotations.ANNOTATION_LANGUAGE); annotation.getValues().put(PropertyAnnotations.SOURCE_LANGUAGE, normalizeLanguage(srcLanguage)); annotation.getValues().put(PropertyAnnotations.TARGET_LANGUAGE, normalizeLanguage(targetLanguage));