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

4622866: javax.swing.text.Document.remove(int, int) has a misleading picture #15701

Closed
wants to merge 10 commits into from

Conversation

aivanov-jdk
Copy link
Member

@aivanov-jdk aivanov-jdk commented Sep 13, 2023

The image in the documentation for Document.remove looks as if the portion between the offsets 6 and 10 is removed. However, the entire region for ‘quick ’ is highlighted.

I updated the image to mark the start offset 4 and the end offset 10. The new image is in SVG format which looks crisp on modern High DPI displays.

I added a sentence that describes the image, which makes the documentation accessible and clearer.

Also, I marked up references to classes and members with {@code}.

Look at the updated version: Document.remove in JDK 22.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-4622866: javax.swing.text.Document.remove(int, int) has a misleading picture (Bug - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/15701/head:pull/15701
$ git checkout pull/15701

Update a local copy of the PR:
$ git checkout pull/15701
$ git pull https://git.openjdk.org/jdk.git pull/15701/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 15701

View PR using the GUI difftool:
$ git pr show -t 15701

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/15701.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 13, 2023

👋 Welcome back aivanov! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 13, 2023
@openjdk
Copy link

openjdk bot commented Sep 13, 2023

@aivanov-jdk The following label will be automatically applied to this pull request:

  • client

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the client client-libs-dev@openjdk.org label Sep 13, 2023
@mlbridge
Copy link

mlbridge bot commented Sep 13, 2023

Webrevs

@aivanov-jdk
Copy link
Member Author

Perhaps, the intention of the original image was to demonstrate that all the marks in the range 4–10 are collapsed to 4. That is the mark at offset 6 is at offset 4 after the removal:

Diagram of removal of ‘quick’ from ‘The quick brown fox.’ The marks at offsets 4, 6, 10 have offset 4 after the removal

The above image could still be confusing.

The 'shape-rendering: crispEdges' did give crisp edges in 100% scale,
but in 200% scale some edges are 3-pixel wide and others are 2-pixel.
Using 0.5 pixel offset solves both problems. I verified rendering on
100%-scale display as well as on 150%- and 200%-scale displays.
@openjdk
Copy link

openjdk bot commented Sep 19, 2023

@aivanov-jdk This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

4622866: javax.swing.text.Document.remove(int, int) has a misleading picture

Reviewed-by: prr

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 128 new commits pushed to the master branch:

  • 0c97246: 8311113: Remove invalid pointer cast and clean up setLabel() in awt_MenuItem.cpp
  • d2b2f67: 8315952: Open source several Swing JToolbar JTooltip JTree tests
  • 5f6cee8: 8316056: Open source several Swing JTree tests
  • b685ee0: 8314830: runtime/ErrorHandling/ tests ignore external VM flags
  • e0f8d16: 8314829: serviceability/sa/jmap-hprof/JMapHProfLargeHeapTest.java ignores vm flags
  • 7b1e2bf: 8315415: OutputAnalyzer.shouldMatchByLine() fails in some cases
  • da57d2a: 8308592: Framework for CA interoperability testing
  • a6d120d: 8316513: Serial: Remove unused invalidate_remembered_set
  • 607bd4e: 8316294: AIX: Build fopen system call fails on file _BUILD_LIBJDWP_objectfilenames.txt
  • f25c920: 8314774: Optimize URLEncoder
  • ... and 118 more: https://git.openjdk.org/jdk/compare/d0be73a78038faf9509623bc4ba71eb4385cd645...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 19, 2023
@aivanov-jdk
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Sep 28, 2023

Going to push as commit 73a47f0.
Since your change was applied there have been 270 commits pushed to the master branch:

  • cfcbfc6: 8316879: RegionMatches1Tests fails if CompactStrings are disabled after JDK-8302163
  • ca5eee2: 8316445: Mark com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java as vm.flagless
  • 060db1b: 8315031: YoungPLABSize and OldPLABSize not aligned by ObjectAlignmentInBytes
  • 3481a48: 8316974: ListFormat creation is unsuccessful for some of the supported Locales
  • 29348b3: 8316894: make test TEST="jtreg:test/jdk/..." fails on AIX
  • 3f19df6: 8315936: Parallelize gc/stress/TestStressG1Humongous.java test
  • fc98998: 8316580: HttpClient with StructuredTaskScope does not close when a task fails
  • 065203d: 8313631: SA: stack trace printed using "where" command does not show class name
  • 0c55887: 8309599: WeakHandle and OopHandle release should clear obj pointer
  • 1230aed: 8316885: jcmd: Compiler.CodeHeap_Analytics cmd does not inform about missing aggregate
  • ... and 260 more: https://git.openjdk.org/jdk/compare/d0be73a78038faf9509623bc4ba71eb4385cd645...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Sep 28, 2023
@openjdk openjdk bot closed this Sep 28, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Sep 28, 2023
@openjdk
Copy link

openjdk bot commented Sep 28, 2023

@aivanov-jdk Pushed as commit 73a47f0.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client client-libs-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

2 participants