-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from alkyaly/fix/comments-in-nested-classes
Fixes comments not applying when inside nested classes.
- Loading branch information
Showing
3 changed files
with
106 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
src/testmod/java/draylar/omegatest/config/CommentedNestedClassConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
package draylar.omegatest.config; | ||
|
||
import draylar.omegaconfig.api.Comment; | ||
import draylar.omegaconfig.api.Config; | ||
|
||
public class CommentedNestedClassConfig implements Config { | ||
|
||
@Comment("Very nested test") | ||
public First first = new First(); | ||
|
||
@Comment("True") | ||
public boolean test = false; | ||
|
||
@Comment("First-Level") | ||
public VeryNested veryNested = new VeryNested(); | ||
|
||
public static class First { | ||
@Comment("Cucumbers") | ||
public boolean cucumbers = true; | ||
|
||
@Comment("InnerFirst") | ||
public InnerFirst innerFirst = new InnerFirst(); | ||
|
||
@Comment("InnerSecond") | ||
public InnerSecond innerSecond = new InnerSecond(); | ||
|
||
public static class InnerFirst { | ||
@Comment("Number of Tomatoes") | ||
public int numberOfTomatoes = 10; | ||
} | ||
|
||
public static class InnerSecond { | ||
@Comment("Inner Second First") | ||
public InnerSecondFirst innerSecondFirst = new InnerSecondFirst(); | ||
|
||
public static class InnerSecondFirst { | ||
@Comment("Olive Oil") | ||
public String oliveOil = "oliveOil"; | ||
} | ||
} | ||
} | ||
|
||
public static class VeryNested { | ||
@Comment("Second-Level") | ||
public Very very = new Very(); | ||
public static class Very { | ||
@Comment("Third-Level") | ||
public VeryVery veryVery = new VeryVery(); | ||
public static class VeryVery { | ||
@Comment("Forth-Level") | ||
public VeryVeryVery veryVeryVery = new VeryVeryVery(); | ||
public static class VeryVeryVery { | ||
@Comment("Fifth-Level") | ||
public VeryVeryVeryVery veryVeryVeryVery = new VeryVeryVeryVery(); | ||
public static class VeryVeryVeryVery { | ||
@Comment("Sixth-Level") | ||
public String last = "last"; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return "commented-inner-classes"; | ||
} | ||
|
||
@Override | ||
public String getExtension() { | ||
return "json5"; | ||
} | ||
} |