Bug 538989 - FormText: Copying selection text contains unwanted leading
newline

When the selection is computed in FormText#ComputeSelection, the
selection data gets flagged with "newLineNeeded", if there is more than
one paragraph.

However, if not all of those paragraphs contribute to the actual
selection, this can lead to an unwanted leading newline.

Solution:
Remove the explicit SelectionData#markNewLine. There are no use-cases
where this would require this specific control over the newlines.
Instead, simply handle adding of newlines implicitly by checking the
number of already existing segments.


Change-Id: Iab7cfb2b8375da3da32440eb78084ef3a3348414
Signed-off-by: Sebastian Ratz <sebastian.ratz@sap.com>
3 files changed
tree: 0cb710eed2944d2d524385a122e93b76ccd3dc8b
  1. .mvn/
  2. bundles/
  3. examples/
  4. features/
  5. releng/
  6. tests/
  7. .gitignore
  8. CONTRIBUTING.md
  9. pom.xml
  10. README.md
README.md

Contributing to Eclipse Platform UI project

Thanks for your interest in this project.

Project description:

Platform UI provides the basic building blocks for user interfaces built with Eclipse.

Some of these form the Eclipse Rich Client Platform (RCP) and can be used for arbitrary rich client applications, while others are specific to the Eclipse IDE. The Platform UI codebase is built on top of the Eclipse Standard Widget Toolkit (SWT), which is developed as an independent project.

Website: http://www.eclipse.org/platform/ui/

For more information, refer to the Platform UI wiki page.

How to contribute:

Contributions to Platform UI are most welcome. There are many ways to contribute, from entering high quality bug reports, to contributing code or documentation changes. For a complete guide, see the Platform UI - How to contribute wiki page page on the team wiki.

Test dependencies

Several test plug-ins have a dependency to the Mockito and Hamcrest library. Please install them from the Orbit Download page

Currently the following versions are required:

  • org.hamcrest;bundle-version=“1.1.0”,
  • org.mockito;bundle-version=“1.8.4”,

How to build on the command line

You need Maven 3.3.1 installed. After this you can run the build via the following command:

mvn clean verify -Pbuild-individual-bundles

Developer resources:

Information regarding source code management, builds, coding standards, and more.

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).

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!

Contact:

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

License

[Eclipse Public License (EPL) v1.0][4]