-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Make CSL Citation Adapter non-static #11535
Conversation
private static final BibEntryTypesManager BIB_ENTRY_TYPES_MANAGER = new BibEntryTypesManager(); | ||
private static final CitationStyleOutputFormat FORMAT = CitationStyleOutputFormat.HTML; | ||
private final CitationStyleOutputFormat format = CitationStyleOutputFormat.HTML; | ||
private final BibEntryTypesManager bibEntryTypesManager = new BibEntryTypesManager(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the already existing instance either by BibEntryTypesManager entryTypesManager = Injector.instantiateModelOrService(BibEntryTypesManager.class);
or try to pass it down via constructor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Went with the latter.
Yay fixed submodules myself this time :) |
@Siedlerchr Any more changes needed, Chris? Or can this be merged? |
@@ -59,11 +58,11 @@ public static void writeCitation(XTextDocument doc, XTextCursor cursor, String c | |||
* The transformed HTML can be used for inserting into a LibreOffice document | |||
* Context: The HTML produced by CitationStyleGenerator.generateCitation(...) is not directly (completely) parsable by OOTextIntoOO.write(...) | |||
* For more details, read the documentation of the write(...) method in the {@link OOTextIntoOO} class. | |||
* Additional information: https://devdocs.jabref.org/code-howtos/openoffice/code-reorganization.html. | |||
* Additional information: <a href="https://devdocs.jabref.org/code-howtos/openoffice/code-reorganization.html">...</a>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is wrong. Either repeat the link inside the a tag or use "additional information" instead of ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I make a separate PR or club it with PR-C of my project?
I accepted IntelliJ's suggestion blindly, forgetting how html hrefs work🤦🏻
Making CSL Citation Adapter non-static
Follow-up to #11521
CSLCitationOOAdapter.java
, we are making a small architectural change to make it's methods non-static. The static nature happened to be unnecessary, and was a result of trying to use dependencies in some way or the other to get the initial implementation of the adapter working.transformHtml
method.Mandatory checks
Change inCHANGELOG.md
described in a way that is understandable for the average user (if applicable)Tests created for changes (if applicable)Screenshots added in PR description (for UI changes)