Skip to content

#40627 Fix schema filter dialog not opening in Simple navigator view#40771

Open
xingxing21 wants to merge 3 commits into
dbeaver:develfrom
xingxing21:fix/40627-schema-filter-simple-navigator-view
Open

#40627 Fix schema filter dialog not opening in Simple navigator view#40771
xingxing21 wants to merge 3 commits into
dbeaver:develfrom
xingxing21:fix/40627-schema-filter-simple-navigator-view

Conversation

@xingxing21
Copy link
Copy Markdown
Contributor

@xingxing21 xingxing21 commented Apr 14, 2026

…reference (#40627)

Problem

In Simple navigator view (DatabaseBrowserView), right-clicking a filtered node and selecting "Configure Filter Settings" did nothing — the dialog never opened. The Advanced view (DatabaseNavigatorView) was unaffected.

There were two layered root causes:

  1. NavigatorUtils.getNavigatorTree() had a type check of instanceof DatabaseNavigatorView, which excluded DatabaseBrowserView. As a result, the method returned null when called from Simple view, and the context menu item was never populated.

  2. NavigatorHandlerFilterConfig.configureFilters() silently returned when DBNUtils.getValidItemsMeta() returned null, making such failures invisible in logs.

Changes

NavigatorUtils.java

  • Changed instanceof DatabaseNavigatorView to instanceof NavigatorViewBase — the shared abstract base of both Simple and Advanced views — so getNavigatorTree() correctly resolves the active tree regardless of which navigator view is open.

NavigatorHandlerFilterConfig.java

  • Added an else branch with log.debug() when itemsMeta is null, so silent no-ops are visible in debug logs.
Recording.2026-04-15.022151.mp4

Copilot AI review requested due to automatic review settings April 14, 2026 17:24
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a UI regression where “Configure Filter Settings” did nothing in the Simple navigator view by ensuring navigator tree resolution works for both Simple and Advanced navigator views, and by making a previously silent failure mode visible in logs.

Changes:

  • Update NavigatorUtils.getNavigatorTree() to recognize NavigatorViewBase (covers both DatabaseBrowserView and DatabaseNavigatorView).
  • Add a debug log when DBNUtils.getValidItemsMeta() returns null in filter configuration, avoiding silent no-ops.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
plugins/org.jkiss.dbeaver.ui.navigator/src/org/jkiss/dbeaver/ui/navigator/actions/NavigatorHandlerFilterConfig.java Adds debug logging when filter item metadata can’t be resolved, improving diagnosability.
plugins/org.jkiss.dbeaver.ui.navigator/src/org/jkiss/dbeaver/ui/navigator/NavigatorUtils.java Generalizes active navigator tree detection to work across both navigator view implementations.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

ShadelessFox
ShadelessFox previously approved these changes Apr 15, 2026
@ShadelessFox ShadelessFox requested a review from E1izabeth April 15, 2026 12:43
@ShadelessFox
Copy link
Copy Markdown
Member

Please update your commit message per our contribution guide

E1izabeth
E1izabeth previously approved these changes Apr 15, 2026
@xingxing21 xingxing21 changed the title fix: schema filter dialog not opening in Simple navigator view(#40627) #40627 fix: schema filter dialog not opening in Simple navigator view Apr 15, 2026
@xingxing21 xingxing21 changed the title #40627 fix: schema filter dialog not opening in Simple navigator view #40627 Fix schema filter dialog not opening in Simple navigator view Apr 15, 2026
@xingxing21
Copy link
Copy Markdown
Contributor Author

@ShadelessFox
I just changed the commit message.
Thanks!

@ShadelessFox
Copy link
Copy Markdown
Member

Thanks! Passing to QA team.

@ShadelessFox ShadelessFox linked an issue Apr 15, 2026 that may be closed by this pull request
@xingxing21 xingxing21 force-pushed the fix/40627-schema-filter-simple-navigator-view branch from fb21a49 to 0dd21b2 Compare April 15, 2026 16:18
@ShadelessFox
Copy link
Copy Markdown
Member

Please clean up your commits. Drop everything redundant and rebase onto devel.

@xingxing21
Copy link
Copy Markdown
Contributor Author

@ShadelessFox ,
sorry, mean?

@ShadelessFox
Copy link
Copy Markdown
Member

Your commit history is filled with external commits that are not related to your PR, caused by an improper merge/rebase commit. Use interactive rebase and drop redundant commits, then rebase your branch onto remote devel.

See https://github.com/dbeaver/dbeaver/pull/40771/commits

@xingxing21 xingxing21 dismissed stale reviews from E1izabeth and ShadelessFox via 46e9b68 April 16, 2026 13:08
@xingxing21 xingxing21 force-pushed the fix/40627-schema-filter-simple-navigator-view branch from 3765d23 to 46e9b68 Compare April 16, 2026 13:08
@xingxing21
Copy link
Copy Markdown
Contributor Author

Hi @MashaKorax
I hope you’re doing well.
I wanted to kindly ask if you might have time to take a look at this PR when convenient. I’d really appreciate any feedback or suggestions you may have.

Thank you for your time and for maintaining the project!

@uslss
Copy link
Copy Markdown
Member

uslss commented Apr 24, 2026

error on attempt to apply schema filters

dbeaver_afMRpM5ZJT.mp4
eclipse.buildId=unknown
java.version=21.0.10
java.vendor=Eclipse Adoptium
BootLoader constants: OS=win32, ARCH=aarch64, WS=win32, NL=en
Framework arguments:  -eclipse.keyring C:\Users\Dziyana\AppData\Roaming\DBeaverData\secure\secure_storage
Command-line arguments:  -os win32 -ws win32 -arch aarch64 -eclipse.keyring C:\Users\Dziyana\AppData\Roaming\DBeaverData\secure\secure_storage

org.eclipse.ui
Error
Fri Apr 24 14:14:45 CEST 2026
Failed to update callback: org.jkiss.dbeaver.core.txn.autocommit

java.lang.IllegalStateException: No databases found on the server
	at org.jkiss.dbeaver.ext.postgresql.model.PostgreDataSource.getDefaultInstance(PostgreDataSource.java:689)
	at org.jkiss.dbeaver.ext.postgresql.model.PostgreDataSource.getDefaultInstance(PostgreDataSource.java:74)
	at org.jkiss.dbeaver.registry.DataSourceDescriptor.getActiveTransactionsIsolation(DataSourceDescriptor.java:547)
	at org.jkiss.dbeaver.ui.actions.datasource.DataSourceAutoCommitHandler.updateElement(DataSourceAutoCommitHandler.java:132)
	at org.eclipse.ui.internal.handlers.HandlerProxy.updateElement(HandlerProxy.java:435)
	at org.eclipse.ui.internal.handlers.E4HandlerProxy.updateElement(E4HandlerProxy.java:124)
	at org.eclipse.ui.internal.WorkbenchHandlerServiceHandler.updateElement(WorkbenchHandlerServiceHandler.java:43)
	at org.eclipse.ui.internal.commands.CommandService$1.run(CommandService.java:260)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:47)
	at org.eclipse.ui.internal.commands.CommandService.refreshElements(CommandService.java:264)
	at org.jkiss.dbeaver.ui.ActionUtils.lambda$fireCommandRefresh$1(ActionUtils.java:490)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:132)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4122)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3738)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1160)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1051)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:684)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:583)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:173)
	at org.jkiss.dbeaver.ui.app.standalone.DBeaverApplication.start(DBeaverApplication.java:331)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:219)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:149)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:115)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:467)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:298)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at org.jkiss.dbeaver.launcher.DBeaverLauncher.invokeFramework(DBeaverLauncher.java:1032)
	at org.jkiss.dbeaver.launcher.DBeaverLauncher.basicRun(DBeaverLauncher.java:661)
	at org.jkiss.dbeaver.launcher.DBeaverLauncher.run(DBeaverLauncher.java:1840)

@xingxing21
Copy link
Copy Markdown
Contributor Author

Hi @uslss
No it's my fixed region.
My case is for Simple navigator view(Database Browser) and not Database Navigator.
Please check it again on Database Browser.
Thank you for your feedback.

@xingxing21
Copy link
Copy Markdown
Contributor Author

And the error is "java.lang.IllegalStateException: No databases found on the server"

@xingxing21
Copy link
Copy Markdown
Contributor Author

Hi @uslss

Did you test it again?
Cuz I can't repro your issue on my side.

@xingxing21
Copy link
Copy Markdown
Contributor Author

Hello @uslss

I hope you’re doing well.
I wanted to kindly ask if you might have time to take a look at this PR when convenient. I’d really appreciate any feedback or suggestions you may have.

Thank you for your time and for maintaining the project!
Best regards.

@ShadelessFox
Copy link
Copy Markdown
Member

@xingxing21

It's awaiting QA and will be reviewed again once one of our QA engineers is available. So please, be patient :)

@xingxing21
Copy link
Copy Markdown
Contributor Author

@ShadelessFox Thank you for your response 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Schema Filter not opening on UI

5 participants