Skip to content

Add support for inheritance of dialogs#17

Closed
koppor wants to merge 1 commit into
mainfrom
add-inheritance-suppport
Closed

Add support for inheritance of dialogs#17
koppor wants to merge 1 commit into
mainfrom
add-inheritance-suppport

Conversation

@koppor

@koppor koppor commented Aug 1, 2024

Copy link
Copy Markdown
Member

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

koppor commented Aug 1, 2024

Copy link
Copy Markdown
Member Author

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

@koppor

koppor commented Aug 2, 2024

Copy link
Copy Markdown
Member Author

@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

koppor commented Aug 2, 2024

Copy link
Copy Markdown
Member Author

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