Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve replaceContent for resource files #121

Open
thomasbehr opened this issue Mar 24, 2022 · 1 comment
Open

Improve replaceContent for resource files #121

thomasbehr opened this issue Mar 24, 2022 · 1 comment
Labels
difficulty:beginner Tasks suited especially for beginners. No prior knowledge required. enhancement New feature or request good first issue Good for newcomers

Comments

@thomasbehr
Copy link
Member

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.

@yGuy
Copy link
Member

yGuy commented Mar 24, 2022

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

@yGuy yGuy added enhancement New feature or request difficulty:beginner Tasks suited especially for beginners. No prior knowledge required. labels Mar 24, 2022
thomasbehr added a commit that referenced this issue Nov 4, 2022
- added replacePathPolicy attribute that supersedes replaceName and replacePath
- added replaceContentPolicy attribute that supersedes replaceContent
- added support for dotslash replaceContentSeparator
thomasbehr added a commit that referenced this issue Nov 4, 2022
- added documentation for new policies
@Fohlen Fohlen added the good first issue Good for newcomers label Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty:beginner Tasks suited especially for beginners. No prior knowledge required. enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants