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

Add support for inheritance of dialogs #17

Closed
wants to merge 1 commit into from

Conversation

koppor
Copy link
Member

@koppor koppor commented Aug 1, 2024

You all know, I like inheritance instead of swich/case or ifs. Therefore, I crafted following code for the super class:

        ViewLoader.view(ExtractBibtexDialog.class)
                  .controller(this)
                  .load()
                  .setAsDialogPane(this);
classDiagram
    ExtractBibtexDialog <|-- ExtractBibtexDialogGrobid
    ExtractBibtexDialog <|-- ExtractBibtexDialogOffline
Loading

--

I could solve it differently. Leaving this PR for future reference

@koppor koppor closed this Aug 1, 2024
@koppor koppor deleted the add-inheritance-suppport branch August 1, 2024 18:09
@koppor koppor restored the add-inheritance-suppport branch August 1, 2024 18:36
@koppor koppor reopened this Aug 1, 2024
@koppor
Copy link
Member Author

koppor commented Aug 1, 2024

Sorry, even with more cleaner code, it doesn't work without that patch.

@koppor
Copy link
Member Author

koppor commented Aug 2, 2024

@calixtus Required by JabRef/jabref#11565. I hope, I find time to propose another solution using some composition or helper class instead of one-level inheritance.

@koppor
Copy link
Member Author

koppor commented Aug 2, 2024

Not required. We went for if then else

@koppor koppor closed this Aug 2, 2024
@koppor koppor deleted the add-inheritance-suppport branch August 2, 2024 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants