Enhanced Template Java class name substitution #522
+10
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixing #512
Key Enhancement:
Auto-Class Naming for Java:
When creating a new Java file via Competitive Companion, the placeholder CLASS_NAME in the Java template is automatically replaced with the problem's name.
This ensures that the Java class name matches the problem name, complying with Java's requirement for public class names to match the filename.
Testing Instructions:
Ensure your Java template includes CLASS_NAME as a placeholder for the class name.
Use Competitive Companion to create a new Java file.
Verify that the generated file replaces CLASS_NAME with the problem name correctly.
Additional Notes:
This feature is specific to Java but can be adapted for other languages with similar requirements.
Also for non template file, we can have some boiler for each language.