Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The new approach uses token ranges instead of line ranges internally. The formatter records the token indices of boundaries where it's safe to start/end partial formatting, and then reformatting is only done for entire regions. Regions that can be re-formatted atomically include: -package declarations -import declarations -type declaration signatures (e.g. 'class' up to the first '{') -method declaration signatures (e.g. modifiers up to '{') -field declarations -entire (non-block) statements -lines containing only trailing braces ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=93730338
- Loading branch information
Showing
11 changed files
with
712 additions
and
424 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
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.