Comments (2)
This is expected behaviour. prettyprint()
creates a new DefaultJavaPrettyPrinter
. To use your configured creator, use toString()
and your Output will be properly minimized.
from spoon.
I will make a pull request, explicitly stating this in the Javadoc, because from the current one it is not obvious:
https://spoon.gforge.inria.fr/mvnsites/spoon-core/apidocs/spoon/reflect/declaration/CtElement.html#prettyprint()
the source code of this element with the pretty-printing rules of Spoon Warning: this is not side-effect free, this triggers some ImportAnalyzer which would change the model: add/remove imports, change the value
implicit
of some model elements, etc.
(Well, it is implied by the "pretty-printing rules of spoon")
from spoon.
Related Issues (20)
- Java Compatibility with Older Versions of Spoon HOT 1
- [Bug]: CtReferenceImpl.isSpecialType throws an exception
- [Bug]: Bug adding comment in AST of lambda HOT 2
- Update a method calls reference
- java 22 HOT 1
- [Bug]: Control Flow graph missing edge for implicit default case in switch
- [Bug]: Control Flow Graph doesn't handle cases with multiple expressions
- Spotless for imports HOT 4
- [Bug]: Spoon inserts incorrect break in enhanced switch block
- [Bug]: Javadoc of class missing HOT 1
- improve reproducible build architecture for Spoon HOT 7
- Unable to start JavaFX UI HOT 2
- How to Implement Angelic Value with Spoon for APR
- Processing import Statements HOT 2
- links to some of the transformation examples are broken
- [Bug]: Not allowed javaletter or keyword in identifier found. See JLS for correct identifier. Identifier: E' HOT 1
- [Bug]: can not process lombok annatations HOT 3
- How to create static call graph with only invocations within project?
- [Bug]: Inconsistent parent for `CtTypeReferenceImpl` in `CtRecordComponentImpl` which points to a `CtMethodImpl`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spoon.