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

Explain FailedDockable When Failing to Restore Dynamic Dockable #268

Open
andrewauclair opened this issue Jan 27, 2025 · 2 comments
Open
Labels
bug Something isn't working fixed Issue has been fixed, pending release.

Comments

@andrewauclair
Copy link
Owner

I have a dockable that's failing to restore for some reason. This is causing DockingStateAPI.restoreTabbed to attempt creating a dynamic dockable instance, but this dockable isn't dynamic, so it fails. The log message for this only explains that it couldn't find a (String, String) constructor, and not why the dockable failed in the first place.

Not entirely sure how to do it better. getDockable simply looks up the name. But the code should throw a DockableNotFoundException if the dockable fails to be found and fails to load as a dynamic dockable.

@andrewauclair
Copy link
Owner Author

The only difference in my XML layout files is the new class-name attribute for .

@andrewauclair andrewauclair added the bug Something isn't working label Jan 27, 2025
@andrewauclair
Copy link
Owner Author

It looks like the bug is caused by loading the persistentID as the class name when class-name is missing.

andrewauclair added a commit that referenced this issue Jan 27, 2025
Persistent ID and class-name for tabs and simple panels are now loaded based on name, not index.

When a failed dockable fails to load as a dynamic dockable, the log message is severe and dockable is set to null to force a DockableNotFoundException.
andrewauclair added a commit that referenced this issue Jan 27, 2025
Persistent ID and class-name for tabs and simple panels are now loaded based on name, not index.

When a failed dockable fails to load as a dynamic dockable, the log message is severe and dockable is set to null to force a DockableNotFoundException.
@andrewauclair andrewauclair added the fixed Issue has been fixed, pending release. label Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed Issue has been fixed, pending release.
Projects
None yet
Development

No branches or pull requests

1 participant