-
-
Notifications
You must be signed in to change notification settings - Fork 352
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
feature: add support for pretty-printing Java 15 text blocks #3664
Merged
Merged
Changes from 23 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
a3d9200
Fix a minor typo
LakshyAAAgrawal c4cc236
Implement CtTextBlock
LakshyAAAgrawal 8fc169e
Add Factory methods to create textblock
LakshyAAAgrawal ac431bc
Make changes to Visitors to add CtTextBlock
LakshyAAAgrawal cd67115
Add prettyprinting for TextBlock and testcase
LakshyAAAgrawal f0cd5f6
Add clone method to CtTextBlock interface and fix minor typo
LakshyAAAgrawal f98e48f
Add public API doc and add CtTextBlock to metamodel
LakshyAAAgrawal a442d5c
Enable preview in CommentTest to compile textblock snippet
LakshyAAAgrawal 597b0fd
Change javadoc createTextBlock in Factory.java
LakshyAAAgrawal c3c7fcd
Make changes to CloneBuilder
LakshyAAAgrawal cdf8621
Auto generate CloneVisitor
LakshyAAAgrawal 9ab22cd
Auto generate ReplacementVisitor
LakshyAAAgrawal 8363bc3
Auto generate ModelRoleHandlers
LakshyAAAgrawal cf0e993
Auto generate CtBiScannerDefault
LakshyAAAgrawal 96225e1
Add CtTextBlock in EqualsChecker
LakshyAAAgrawal 53e3c75
Add doc for CtTextBlock and fix minor typo
LakshyAAAgrawal d4d9488
Make changes to TextBlock Pretty Printing
LakshyAAAgrawal 882d153
Support TextBlock creation from parsed source and add tests checking …
LakshyAAAgrawal 78ca285
Add CtTextBlock to code_elements.md
LakshyAAAgrawal d13b558
FIx CtInheritanceScannerTest failure
LakshyAAAgrawal f4091fb
Fix CtGenerationTest issue
LakshyAAAgrawal f62980c
Fix checkstyle issues
LakshyAAAgrawal 29f793f
Add CtTextBlock to ControlFlowBuilder
LakshyAAAgrawal b316147
Add Type to CtTextBlock factory
LakshyAAAgrawal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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,25 @@ | ||
/** | ||
* SPDX-License-Identifier: (MIT OR CECILL-C) | ||
* | ||
* Copyright (C) 2006-2019 INRIA and contributors | ||
* | ||
* Spoon is available either under the terms of the MIT License (see LICENSE-MIT.txt) of the Cecill-C License (see LICENSE-CECILL-C.txt). You as the user are entitled to choose the terms under which to adopt Spoon. | ||
*/ | ||
package spoon.reflect.code; | ||
|
||
/** | ||
* This code element defines a Text Block String Literal. | ||
* | ||
* <pre> | ||
* String example = """ | ||
* Test String | ||
* """; | ||
* </pre> | ||
* | ||
* The example above shows a TextBlock literal, in which the string is represented by CtTextBlock | ||
*/ | ||
public interface CtTextBlock extends CtLiteral<String> { | ||
/** Overriding return type, a clone of a CtTextBlock returns a CtTextBlock */ | ||
@Override | ||
CtTextBlock clone(); | ||
} |
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix or remove?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for pointing out. I have made some changes. Kindly give them a look.