Bug 568033 - IllegalArgumentException in StyledText.replaceTextRange()

Fixed to no longer throw exception if \r\n were on different lines
already.

Even though the test snippet reproduces exactly the stack as reported by
users, I do feel that users might be having a different problem. This
feeling mostly comes from the fact that we only received reports on
Windows in combination with 'WM_IME_COMPOSITION', while the snippet
reproduces the problem on all 3 platforms.

For this reason, I also changed 'DefaultContent.isValidReplace()' to
throw 3 different exceptions with additional info to help future
debugging if this patch doesn't solve the problem.

I didn't find any outside uses of 'DefaultContent.isValidReplace()', so
I think that it's OK to remove 'protected' and change signature.

Change-Id: I6d0234414e2cad637e029f557e4c9ead213f1db3
Signed-off-by: Alexandr Miloslavskiy <alexandr.miloslavskiy@syntevo.com>
3 files changed
tree: ba0d0348a56a5a386d8c2b5876dce3cb1d180da7
  1. bundles/
  2. container/
  3. examples/
  4. features/
  5. local-build/
  6. tests/
  7. .gitignore
  8. CONTRIBUTING
  9. LICENSE
  10. NOTICE
  11. pom.xml
  12. README.md
README.md

Contributing to SWT

Thanks for your interest in this project.

Developer resources:

See the following description for how to contribute a feature or a bug fix to SWT.

Information regarding source code management, builds, coding standards, and more and be found under the following link.

Contributor License Agreement:

Before your contribution can be accepted by the project, you need to create and electronically sign the Eclipse Foundation Contributor License Agreement (CLA).

Contact:

Contact the project developers via the project's “dev” list.

Search for bugs:

This project uses Bugzilla to track ongoing development and issues.

Create a new bug:

Be sure to search for existing bugs before you create another one. Remember that contributions are always welcome!