yGuard icon indicating copy to clipboard operation
yGuard copied to clipboard

Improve replaceContent for resource files

Open thomasbehr opened this issue 3 years ago • 1 comments
trafficstars

When using <adjust replaceContent="true">, yGuard can replace either path names or class names (if replaceContentSeparator="." is used as well), but not both in one file.

As a result, content like e.g.

<example>
  <class name="com.yworks.yguard.StringReplacer"/>
  <file name="com/yworks/yguard/StringReplacer.properties"/>
</example>

can be adjusted to

<example>
  <class name="A.A.A.SR"/>
  <file name="com/yworks/yguard/StringReplacer.properties"/>
</example>

or

<example>
  <class name="com.yworks.yguard.StringReplacer"/>
  <file name="A/A/A/SR.properties"/>
</example>

but not to

<example>
  <class name="A.A.A.SR"/>
  <file name="A/A/A/SR.properties"/>
</example>

which is what you need in this case.

thomasbehr avatar Mar 24 '22 13:03 thomasbehr

Having replaceContentSeparator accept more than one character could solve this "./\;,"

yGuy avatar Mar 24 '22 15:03 yGuy