Skip to content

CSL Preferences [WIP]#6

Closed
subhramit wants to merge 4 commits into
oo-cslfrom
csl-preferences
Closed

CSL Preferences [WIP]#6
subhramit wants to merge 4 commits into
oo-cslfrom
csl-preferences

Conversation

@subhramit

@subhramit subhramit commented Jul 12, 2024

Copy link
Copy Markdown
Owner

Halted due to architecture changes (#7 ).

Mandatory checks

  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

Comment thread src/main/java/org/jabref/logic/openoffice/OpenOfficePreferences.java Outdated
Comment thread src/main/java/org/jabref/preferences/JabRefPreferences.java Outdated
Comment thread src/main/java/org/jabref/gui/openoffice/StyleSelectDialogViewModel.java Outdated
Comment thread src/main/java/org/jabref/gui/openoffice/StyleSelectDialogViewModel.java Outdated

@Siedlerchr Siedlerchr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

use enum in prefs

@subhramit

Copy link
Copy Markdown
Owner Author

Applied review changes

/**
* @param style This can be either a String (for CSL) or OOBibStyle (for JStyle)
*/
public class StyleIdentifier {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You now run into the architecture issues I already talked about in the beginning.

Make this an interface.
Let both CSLStyle and OOStyle implement the interface
In the StyleSelectionViewMOdel you then store he concrete style object
https://docs.oracle.com/en/java/javase/17/language/pattern-matching-instanceof-operator.html

As an example you can take a look at the PreviewLayout interface and it's subclasses, e.g. CitationStylePreviewLayout
The latter one also has a path method

I think this makes it a bit more cleaner and you don't have to do a cast to object

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.

3 participants