String (@NotNull final DomElement context, @NotNull @NlsSafe String valueString) { PropertyExpander expander = new PropertyExpander(valueString); if (!expander.hasPropertiesToExpand()) { return valueString; } final Map<String, String> cached = RESOLVED_STRINGS_MAP_KEY.get(context); if (cached != null) { expander.acceptProvider(new CachedPropertiesProvider(cached)); if (!expander.hasPropertiesToExpand()) { return expander.getResult(); } } expander.setPropertyExpansionListener(new PropertyExpander.PropertyExpansionListener() { @Override public void onPropertyExpanded(String propName, String propValue) { cacheResult(context, RESOLVED_STRINGS_MAP_KEY, propName, propValue); } }); AntDomProject project = context.getParentOfType(AntDomProject.class, false); if (project == null) { return expander.getResult(); } project = project.getContextAntProject(); new AntStringResolver(context, expander).execute(project, project.getDefaultTarget().getRawText()); return expander.getResult(); }