Skip to content
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

Fix issue 866: LexicalPreservingPrinter: Unsupported operation - remove #932

Merged
merged 39 commits into from
May 21, 2017

Conversation

ftomassetti
Copy link
Member

@ftomassetti ftomassetti commented May 19, 2017

This fix #866.
The PR is built on top of #929 and #930

We introduce a new CsmElement named CsmMix to represent elements that can have any order. They require a specific handling in Difference.apply. We basically considere the CsmMix before the change, after the change and the order of elements in the text trying to figure out the most natural way to change the text.

Additionally we need also to adapt space around in certain cases.

These three PRs combines should fix a few things in the lexical preservation. It is probably not 100% perfect but the number of tests is growing (203) and it should eventually stabilize. There are hard things related to indentation and space reconciliation.

In the long term I hope we root out all bugs, we grow our test base and then in 4.0 we can improve the whole design.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 66.974% when pulling 6125d1a on ftomassetti:issue866 into 0e768bf on javaparser:master.

@matozoid matozoid changed the title Issue 866 Fix issue 866: LexicalPreservingPrinter: Unsupported operation - remove May 19, 2017
@matozoid
Copy link
Contributor

Mergey merge merge?

@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 66.924% when pulling 4543ed1 on ftomassetti:issue866 into e999169 on javaparser:master.

@ftomassetti
Copy link
Member Author

Rebased after merging #933

@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 66.936% when pulling a335935 on ftomassetti:issue866 into 5523c58 on javaparser:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.3%) to 66.94% when pulling 7d55cf4 on ftomassetti:issue866 into 5523c58 on javaparser:master.

@ftomassetti ftomassetti merged commit 1b6d2d1 into javaparser:master May 21, 2017
@matozoid matozoid added this to the next release milestone May 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LexicalPreservingPrinter: Unsupported operation - remove()
3 participants