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

JDK-8292669: IGV: Search not useable when in Overflow Toolbar #9940

Closed
wants to merge 7 commits into from

Conversation

tobiasholenstein
Copy link
Member

@tobiasholenstein tobiasholenstein commented Aug 19, 2022

Overview

The toolbar of the EditorTopComponent uses an overflow toolbar when it does not fit in the width of the TopComponent. When the window was not wide enough the QuickSearch used to land in the overflow toolbar. Unfortunately, QuickSearch stops working in the overflow toolbar.

Now the QuickSearch never lands in the overflow toolbar anymore as shown bellow:
ToolbarOverflow

Since the Netbeans Platform only allows for one occurrence of QuickSearch, it is only shown in the EditorTopComponent that was selected last.

Implementation

We introduce a new JPanel named topPanel as a parent container.
topPanel

topPanel contains another JPanel toolbarPanel and a Toolbar quickSearchToolbar:
Toolbars

toolbarPanel uses the GridLayout which gives the original Toolbar toolBar the maximal available width while still allowing it to overflow.
On the right we have quickSearchToolbar, a Toolbar with a single element quickSearchPresenter. We give quickSearchPresenter a minimum size and use the BoxLayout in quickSearchToolbar that respects the minimum size of its children. Therefore the quickSearchToolbar never overflows.
Toolbars_inner


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-8292669: IGV: Search not useable when in Overflow Toolbar

Reviewers

Contributors

  • Christian Hagedorn <chagedorn@openjdk.org>
  • Tobias Holenstein <tholenstein@openjdk.org>

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 9940

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 19, 2022

👋 Welcome back tholenstein! 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
Copy link

openjdk bot commented Aug 19, 2022

@tobiasholenstein The following label will be automatically applied to this pull request:

  • hotspot-compiler

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 hotspot-compiler hotspot-compiler-dev@openjdk.org label Aug 19, 2022
add LEFT_ALIGNMENT and RIGHT_ALIGNMENT

remove setDisplayOverflowOnHover(false)

Linux fix

remove not needed setAlignmentX
@tobiasholenstein tobiasholenstein marked this pull request as ready for review August 24, 2022 12:59
@openjdk openjdk bot added the rfr Pull request is ready for review label Aug 24, 2022
@tobiasholenstein
Copy link
Member Author

/contributor add @chhagedorn

@openjdk
Copy link

openjdk bot commented Aug 24, 2022

@tobiasholenstein
Contributor Christian Hagedorn <chagedorn@openjdk.org> successfully added.

@mlbridge
Copy link

mlbridge bot commented Aug 24, 2022

Webrevs

@tobiasholenstein
Copy link
Member Author

/contributor add @tobiasholenstein

@openjdk
Copy link

openjdk bot commented Aug 24, 2022

@tobiasholenstein
Contributor Tobias Holenstein <tholenstein@openjdk.org> successfully added.

Copy link
Member

@chhagedorn chhagedorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks for fixing this! Now I can better use IGV side by side with the code in the IDE.

I've tested it successfully on Linux.

@openjdk
Copy link

openjdk bot commented Aug 24, 2022

@tobiasholenstein 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:

8292669: IGV: Search not useable when in Overflow Toolbar

Co-authored-by: Christian Hagedorn <chagedorn@openjdk.org>
Co-authored-by: Tobias Holenstein <tholenstein@openjdk.org>
Reviewed-by: chagedorn, rcastanedalo

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 172 new commits pushed to the master branch:

  • f91943c: 8292868: Explicitly pass a third temp register to MacroAssembler::store_heap_oop for aarch64
  • 6354a57: 8290711: assert(false) failed: infinite loop in PhaseIterGVN::optimize
  • 3e18773: 8292880: Improve debuggee logging for com/sun/jdi/ClassUnloadEventTest.java
  • 909e1ed: 8292919: Build failure due to UseJVMCICompiler was not declared when C2 is disabled after JDK-8292691
  • 55f5a83: 8282410: Remove SA ProcDebugger support
  • d83faea: 8292250: Create test for co-located JDI MethodEntry, Step, and Breakpoint events
  • e353b57: 8292890: Remove PrintTouchedMethodsAtExit and LogTouchedMethods
  • 95a33fe: 8292314: Cleanup legacy address handling
  • 5d799d8: 8292304: [REDO] JDK-8289208 Test DrawRotatedStringUsingRotatedFont.java occasionally crashes on MacOS
  • 4f50316: 8292680: Convert Dictionary to ConcurrentHashTable
  • ... and 162 more: https://git.openjdk.org/jdk/compare/1c0f0f4211cf564c46753d2cb187c1ef485751cd...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 Aug 24, 2022
@openjdk-notifier
Copy link

@tobiasholenstein Please do not rebase or force-push to an active PR as it invalidates existing review comments. All changes will be squashed into a single commit automatically when integrating. See OpenJDK Developers’ Guide for more information.

@tobiasholenstein
Copy link
Member Author

Updated PR to add the Search when opening a new Tab without first clicking on it

…pot/igv/view/EditorTopComponent.java

Co-authored-by: Christian Hagedorn <christian.hagedorn@oracle.com>
Copy link
Contributor

@robcasloz robcasloz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changeset works fine on Windows as well. I just have a style comment: in my opinion, the import ordering should be left as-is (alphabetic order) for consistency with the rest of the IGV project.

@tobiasholenstein
Copy link
Member Author

tobiasholenstein commented Aug 26, 2022

The changeset works fine on Windows as well. I just have a style comment: in my opinion, the import ordering should be left as-is (alphabetic order) for consistency with the rest of the IGV project.

Thanks for testing on Windows Roberto!

You are right imports should stay in alphabetic order. I had to configure my IDE to not separate the java.* and javax.* imports. I changed it now

@tobiasholenstein
Copy link
Member Author

Thanks @chhagedorn and @robcasloz for the reviews!

/integrate

@openjdk
Copy link

openjdk bot commented Aug 26, 2022

Going to push as commit 2b80349.
Since your change was applied there have been 174 commits pushed to the master branch:

  • 4732abf: 8292910: Remove root to oop cast in HeapDumper
  • f694f8a: 8292083: Detected container memory limit may exceed physical machine memory
  • f91943c: 8292868: Explicitly pass a third temp register to MacroAssembler::store_heap_oop for aarch64
  • 6354a57: 8290711: assert(false) failed: infinite loop in PhaseIterGVN::optimize
  • 3e18773: 8292880: Improve debuggee logging for com/sun/jdi/ClassUnloadEventTest.java
  • 909e1ed: 8292919: Build failure due to UseJVMCICompiler was not declared when C2 is disabled after JDK-8292691
  • 55f5a83: 8282410: Remove SA ProcDebugger support
  • d83faea: 8292250: Create test for co-located JDI MethodEntry, Step, and Breakpoint events
  • e353b57: 8292890: Remove PrintTouchedMethodsAtExit and LogTouchedMethods
  • 95a33fe: 8292314: Cleanup legacy address handling
  • ... and 164 more: https://git.openjdk.org/jdk/compare/1c0f0f4211cf564c46753d2cb187c1ef485751cd...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Aug 26, 2022

@tobiasholenstein Pushed as commit 2b80349.

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

@tobiasholenstein tobiasholenstein deleted the JDK-8292669 branch October 3, 2022 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-compiler hotspot-compiler-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

3 participants