Skip to content

OpenOffice Backend re-architecture B - Package reorganization - #17918

Merged
koppor merged 5 commits into
mainfrom
organize-writer-style-packages
Nov 24, 2026
Merged

koppor merged 5 commits into
mainfrom
organize-writer-style-packages

Conversation

@subhramit

@subhramit subhramit commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #17673
Refs. #11829
Refs. #16380

Summary

Group Writer-specific style definitions and processing into jstyle, bst, and csl, while keeping common style contracts/catalogs in style and document actions/render coordination in engine. Keep generic layout formatting outside citation families and remove the model-to-logic dependency in markup construction. No bevharioal/functional changes.

image

Package ownership

Area Responsibility
openoffice.jstyle, .bst, .csl Writer-specific family processing and formatting, including JStyle/BST style loading.
openoffice.style Common style selection contract and neutral Writer paragraph-style catalogs.
openoffice.engine Shared rendering/action boundary; renderer adapters retain their package-private helpers.
logic.layout.format Reusable layout formatting, including OOPreFormatter, shared by layouts and JStyle.
logic.citationstyle Application-wide CSL loading, metadata, and citeproc integration; not moved under Writer.
model.openoffice Citation data and markup values; OOFormat no longer needs a logic-layer utility or architecture exemption.

Tests and package-relative fixtures follow their implementation packages. The fixture named testWithDefaultLayoutFirst.jstyle checks that default= can precede entry-specific layouts; its contents are unchanged. The developer guide and package-layout SVG document the boundaries.

Related issues and pull requests

Follow-up to #17673
Closes NA

AI usage

Zed coding agent (model GPT-6.1 Sol

AI CHECKLIST.md walkthrough

Code checklist

[!IMPORTANT]
This is a mandatory final gate. When the implementation is finished and before you open a PR, work through every box below and tick it. If a box cannot be ticked, fix the code first; mark a box [/] only if the point genuinely does not apply.

AGENTS.md describes how to write code while developing — this file confirms the finished result. Do not skip the checklist and do not skip individual points.

1. Code self-review

Read your own diff once, top to bottom, and confirm each point.

Nullability and control flow

  • No == null / != null checks — JSpecify annotations (@NullMarked, @Nullable, @NonNull) used instead.
  • No Objects.requireNonNull(...) — nullability expressed via JSpecify annotations.
  • New classes annotated with @NullMarked (org.jspecify.annotations.NullMarked).
  • New packages annotated with @NullMarked (org.jspecify.annotations.NullMarked).
  • Optional consumed with ifPresent / ifPresentOrElse / map / orElseThrow — never orElse(unusedValue) nor an isPresent() + get() block.
  • [/] StringUtil.isBlank(...) used instead of s == null || s.isBlank().

Exceptions

  • [/] No catch (Exception e) — only specific exceptions are caught.
  • [/] No throw new RuntimeException(...) / IllegalStateException(...) — these tear down the whole application.
  • [/] Logged exceptions are passed as the last logger argument (LOGGER.info("...", e)), not concatenated into the message string.

Style and idioms

  • New BibEntry objects built with withers (withField, not setField).
  • Modern Java used: List.of() / Map.of() / Set.of(), Path.of(), SequencedCollection / SequencedSet, text blocks.
  • [/] Regexes use a precompiled Pattern.compile(...) constant, not String.matches(...).
  • [/] Keep alphabetical ordering when adding variables or enum items.
  • [/] Background work uses org.jabref.logic.util.BackgroundTask, not new Thread().
  • No commented-out code, no trivial comments restating the code, no AI-disclosure comments in source.
  • Markdown Javadoc (///) uses Markdown syntax, not JavaDoc inline tags: `code` instead of {@code}, [ClassName] instead of {@link}.

User-facing text

  • [/] All user-facing text localized (Localization.lang in Java, % prefix in FXML).
  • [/] Sentence case (not Title Case); no trailing !; labels do not end with :.
  • [/] Variance expressed with placeholders ("...: %0"), not string concatenation.

Security

  • [/] User-controlled data (request params, entry fields, file contents) is HTML-escaped before being written into any text/html response — including exception/error messages, not just the success body (XSS).

Tests

  • [/] In case issue lists an example, this concrete example is covered by a test case.
  • Behavior changes in org.jabref.model / org.jabref.logic have added or updated tests.
  • Tests assert object contents (assertEquals), use plain JUnit asserts (not AssertJ), have no @DisplayName, do not catch exceptions (let them propagate so JUnit reports setup/teardown failures directly), and use @TempDir instead of manual temp directories.
  • [/] Fetcher tests hit the live endpoints — the remote API is not mocked or stubbed (automated-review suggestions to mock it are rejected on purpose).

2. Verification commands

Run in this order — cheapest first. Each must pass.

  • ./gradlew :jablib:check (or ./gradlew check for all modules).
  • ./gradlew checkstyleMain checkstyleTest checkstyleJmh.
  • ./gradlew modernizer.
  • ./gradlew --no-configuration-cache :rewriteDryRun reports no changes (run ./gradlew rewriteRun to fix).
  • ./gradlew javadoc.
  • npx markdownlint-cli2 "docs/**/*.md" "*.md" (only if Markdown changed).
  • npm ci && npm run textlint reports no misspellings (only if Markdown changed).
  • Only if formatting is still off after rewriteRun: docker run -v $(pwd):/github/workspace ghcr.io/leventebajczi/intellij-format:master "*.java" "" ".idea/codeStyles/Project.xml".

3. Documentation

  • [/] CHANGELOG.md entry added if the change is visible to the user (end-user wording, no extra blank lines, sorted in next to existing entries about the same component/feature). Link the issue if one exists; link the PR only when no issue exists. Use TODO as the placeholder when neither is known yet — never a fake number. No entry for fixes to changes that were themselves introduced after the last release (feature only in ## [Unreleased]) — update the existing unreleased entry instead if needed.
  • [/] Searched jabref/issues and jabref-koppor/issues for a related issue; linked only on a confident match, otherwise kept TODO (no closes/fixes for merely-similar issues).
  • [/] Requirement added to docs/requirements/<area>.md if the change is a new feature or significant bug fix (skip for refactors, minor fixes, and internal changes).
  • Developer documentation under docs/ updated if behavior or architecture changed.

4. Pull request

  • PR body built from .github/PULL_REQUEST_TEMPLATE.md, every section filled.
  • All checklist items kept and marked [x], [ ], or [/].
  • "Steps to test" is a numbered list with a cropped screenshot of the result for every visible change; no video (only allowed when another program is involved, e.g. drag and drop or push to an external application).
  • All HTML comments removed from the PR body.
  • PR created with gh pr create --body-file <file> (not --body).
  • [/] If CHANGELOG.md used a TODO placeholder (no issue confidently identified yet — an existing issue link always stays), the PR was opened as draft, the placeholder was replaced with the real PR-number link after PR creation, committed and pushed, and only then was the PR marked ready for review. If an issue is identified or created later, the link is switched to the issue.

Checklist

  • I own the copyright of the code submitted and I license it under the MIT license
  • If AI tools were used, I disclosed them in the "AI usage" section and reviewed, understood, and take full ownership of all AI-generated code
  • [/] I manually tested my changes in running JabRef (always required)
  • I added JUnit tests for changes (if applicable)
  • [/] I added screenshots in the PR description (if change is visible to the user)
  • [/] I added one sentence (max 20 words) to CHANGELOG.md describing the change from the user's point of view (if the change is visible to the user)
  • [/] I checked the user documentation for up to dateness and submitted a pull request to our user documentation repository

@subhramit subhramit changed the title Organize Writer helpers by citation style family OpenOffice Backend Rewrite B - Package reorganization Nov 23, 2026
@github-actions github-actions Bot added the status: changes-required Pull requests that are not yet complete label Nov 23, 2026
@github-actions github-actions Bot added size: big and removed size: medium status: changes-required Pull requests that are not yet complete labels Nov 23, 2026
@subhramit subhramit changed the title OpenOffice Backend Rewrite B - Package reorganization OpenOffice Backend Re-architecture B - Package reorganization Nov 23, 2026
@subhramit subhramit added dev: code-quality Issues related to code or architecture decisions dev: architecture labels Nov 23, 2026
@subhramit
subhramit marked this pull request as ready for review November 23, 2026 22:18
@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

PR Summary by Qodo

Organize Writer style code by citation family

✨ Enhancement 📝 Documentation 🧪 Tests 🕐 40+ Minutes

Grey Divider

AI Description

• Group Writer-specific JStyle, BST, and CSL helpers by citation family while retaining shared
 rendering in engine.
• Move neutral paragraph-style catalogs and layout formatting out of CSL and JStyle-specific
 packages.
• Remove the model-to-logic dependency in markup construction and add compatibility tests.
Merge Risk 🟡 Medium

Blast radius 🟡 Medium 💥 2 capabilities

  • 2 affected capabilities within one bounded functional scope: Writer citation integration.
  • Style selection is a distinct user operation within the same bounded Writer citation integration.
  • The changed GUI imports and the exported family packages connect the selection surface to the relocated family implementations; this is not an independent deployment or unrelated domain.
  • Citation and bibliography rendering is a separate end-to-end outcome from choosing a style, but both belong to the same bounded Writer citation integration.
  • The path crosses family-specific renderers, shared layout formatting, paragraph-style catalogs, and the engine/document writer; these are implementation hops of this one behavior.
  • This is the paragraph-markup step of the same end-to-end Writer citation integration, not a separate capability: OOFormat output is consumed by the OpenOffice citation and bibliography writer.
Behavioral complexity 🟡 Medium 🧩 Compatibility cases, Straightforward

  • Before: family-specific implementations and OOPreFormatter were addressed through their former packages, and paragraph-style constants were colocated with CSL utilities.
  • After: the same implementations are addressed through new packages, the new packages are exported, persisted OOPreFormatter dispatch remains by the same string, and paragraph-style identifiers are centralized.
  • New correctness conditions are compatibility of all in-repository callers and module exports with the relocated classes, plus preservation of the persisted formatter-name contract.
  • The OOFormat null/empty rewrite is a direct equivalent rule rather than a new algorithm or state interaction.
Potential damage 🟡 Medium 🩹 Temporary loss

  • If the package/API reorganization is inconsistent with a compiled consumer, style selection can fail to build or load.
  • For the repository consumers inspected, imports were updated; no evidence supports persistent state corruption or external side effects.
  • Recovery is code rollback or rebuilding consumers against the new package names; persisted style preferences themselves are not changed by these imports.
  • Reversible by restoring the previous package/API layout or updating dependent consumers.
  • No persistent Writer document repair is expected for this failure mode.
Assessed commit e6d8dda
Diagram

graph TD
  GUI["Writer GUI"] --> Engine["Rendering engine"] --> JStyle["JStyle helpers"] --> Layout["Layout formatting"] --> Model["Markup model"]
  Engine --> BST["BST helpers"] --> Style["Shared style contract"]
  Engine --> CSL["CSL adapter"] --> Style
  GUI --> Style
  Engine --> Style
  JStyle --> Style
  BST --> Model
  CSL --> Model
Loading
High-Level Assessment

Keep the proposed ownership split. Leaving all helpers in style would obscure family boundaries, while moving renderer helpers into family packages would expose engine internals. The shared layout formatter and neutral paragraph-style catalog avoid tying reusable code to one citation family.

Files changed (85) +434 / -181

Refactor (37) +121 / -98
BstStyleSelectViewModel.javaUse the relocated BST style type +1/-1

Use the relocated BST style type

• Updates the view model's BstStyle import to its family package.

jabgui/src/main/java/org/jabref/gui/openoffice/BstStyleSelectViewModel.java

JStyleSelectViewModel.javaUse the relocated JStyle type +1/-1

Use the relocated JStyle type

• Updates the view model's JStyle import to its family package.

jabgui/src/main/java/org/jabref/gui/openoffice/JStyleSelectViewModel.java

ModifyBibliographyPropertiesDialogViewModel.javaRead bibliography style names from the shared catalog +3/-3

Read bibliography style names from the shared catalog

• Switches the title and body style lists from CSLFormatUtils to family-neutral WriterParagraphStyles.

jabgui/src/main/java/org/jabref/gui/openoffice/ModifyBibliographyPropertiesDialogViewModel.java

OpenOfficePanel.javaImport family-specific style loaders +3/-3

Import family-specific style loaders

• Points the panel to the BST and JStyle packages for style loading and selection.

jabgui/src/main/java/org/jabref/gui/openoffice/OpenOfficePanel.java

StyleSelectDialogView.javaUpdate style dialog family imports +3/-3

Update style dialog family imports

• Uses relocated BST notation and loader types and the JStyle loader.

jabgui/src/main/java/org/jabref/gui/openoffice/StyleSelectDialogView.java

StyleSelectDialogViewModel.javaUpdate style selection model imports +5/-5

Update style selection model imports

• References BST and JStyle definitions, notation, and loaders in their family packages.

jabgui/src/main/java/org/jabref/gui/openoffice/StyleSelectDialogViewModel.java

LayoutEntry.javaResolve OOPreFormatter from layout formatting +1/-1

Resolve OOPreFormatter from layout formatting

• Imports the relocated formatter while retaining its existing registered layout name.

jablib/src/main/java/org/jabref/logic/layout/LayoutEntry.java

OOPreFormatter.javaMove Writer preprocessing into shared layout formatting +4/-1

Move Writer preprocessing into shared layout formatting

• Relocates OOPreFormatter out of the Writer style package and adds a nullability annotation.

jablib/src/main/java/org/jabref/logic/layout/format/OOPreFormatter.java

OpenOfficePreferences.javaUpdate preference imports for family helpers +2/-2

Update preference imports for family helpers

• References BST notation and Writer-specific CSL utilities in their new packages.

jablib/src/main/java/org/jabref/logic/openoffice/OpenOfficePreferences.java

BstCitationFormat.javaPlace BST citation notation with BST helpers +3/-3

Place BST citation notation with BST helpers

• Moves the enum to bst and clarifies its role in citations and bibliography labels.

jablib/src/main/java/org/jabref/logic/openoffice/bst/BstCitationFormat.java

BstStyle.javaMove BstStyle into the BST family +2/-1

Move BstStyle into the BST family

• Relocates the style implementation while retaining its shared OOStyle contract.

jablib/src/main/java/org/jabref/logic/openoffice/bst/BstStyle.java

BstStyleLoader.javaMove BST style loading into the BST family +2/-2

Move BST style loading into the BST family

• Relocates the loader and updates its cross-package JStyleLoader documentation link.

jablib/src/main/java/org/jabref/logic/openoffice/bst/BstStyleLoader.java

CSLFormatUtils.javaSeparate CSL adaptation from neutral style names +4/-32

Separate CSL adaptation from neutral style names

• Moves Writer-specific CSL processing into csl. Retrieves bibliography defaults from WriterParagraphStyles instead of owning the shared catalogs.

jablib/src/main/java/org/jabref/logic/openoffice/csl/CSLFormatUtils.java

BstRenderer.javaUse BST-family style types in the renderer +2/-2

Use BST-family style types in the renderer

• Updates imports for relocated BST style and citation notation types.

jablib/src/main/java/org/jabref/logic/openoffice/engine/BstRenderer.java

CitationEngine.javaReference JStyle from its family package +1/-1

Reference JStyle from its family package

• Updates the engine's JStyle import.

jablib/src/main/java/org/jabref/logic/openoffice/engine/CitationEngine.java

CitationFormatConverter.javaUpdate conversion imports for style families +2/-2

Update conversion imports for style families

• Uses relocated BST and JStyle implementations during citation-format conversion.

jablib/src/main/java/org/jabref/logic/openoffice/engine/CitationFormatConverter.java

CslRenderer.javaUse the Writer-specific CSL adapter package +1/-1

Use the Writer-specific CSL adapter package

• Imports CSLFormatUtils from csl instead of oocsltext.

jablib/src/main/java/org/jabref/logic/openoffice/engine/CslRenderer.java

JStyleRenderer.javaUse JStyle-family formatting helpers +3/-3

Use JStyle-family formatting helpers

• Updates imports for JStyle, its bibliography formatter, and its citation processor.

jablib/src/main/java/org/jabref/logic/openoffice/engine/JStyleRenderer.java

RenderOptions.javaUse relocated BST citation notation +1/-1

Use relocated BST citation notation

• Updates the render-options import for BstCitationFormat.

jablib/src/main/java/org/jabref/logic/openoffice/engine/RenderOptions.java

RendererFactory.javaDispatch relocated style implementations +2/-2

Dispatch relocated style implementations

• Imports BST and JStyle implementations from their family packages; renderer selection remains in engine.

jablib/src/main/java/org/jabref/logic/openoffice/engine/RendererFactory.java

UpdatePipeline.javaUpdate pipeline style imports +2/-2

Update pipeline style imports

• References the moved BST and JStyle types without changing pipeline coordination.

jablib/src/main/java/org/jabref/logic/openoffice/engine/UpdatePipeline.java

ZoteroCitationStrategy.javaUpdate Zotero strategy notation import +1/-1

Update Zotero strategy notation import

• Uses BstCitationFormat from the BST package.

jablib/src/main/java/org/jabref/logic/openoffice/engine/ZoteroCitationStrategy.java

JStyle.javaMove JStyle definition into its family package +3/-1

Move JStyle definition into its family package

• Relocates JStyle and imports the shared OOStyle contract and layout preformatter explicitly.

jablib/src/main/java/org/jabref/logic/openoffice/jstyle/JStyle.java

JStyleAuthorYearMarkers.javaGroup author-year markers with JStyle +1/-1

Group author-year markers with JStyle

• Moves the marker helper into the jstyle package.

jablib/src/main/java/org/jabref/logic/openoffice/jstyle/JStyleAuthorYearMarkers.java

JStyleBibliographyFormatter.javaGroup bibliography formatting with JStyle +2/-1

Group bibliography formatting with JStyle

• Moves the formatter into jstyle and imports OOPreFormatter from shared layout formatting.

jablib/src/main/java/org/jabref/logic/openoffice/jstyle/JStyleBibliographyFormatter.java

JStyleCitationFormatter.javaGroup citation formatting with JStyle +2/-2

Group citation formatting with JStyle

• Moves the formatter into jstyle and corrects its OOPreFormatter reference.

jablib/src/main/java/org/jabref/logic/openoffice/jstyle/JStyleCitationFormatter.java

JStyleCitationKeyFormatter.javaGroup citation-key formatting with JStyle +1/-1

Group citation-key formatting with JStyle

• Relocates the citation-key formatter into the family package.

jablib/src/main/java/org/jabref/logic/openoffice/jstyle/JStyleCitationKeyFormatter.java

JStyleCitationKeyMarkers.javaGroup citation-key markers with JStyle +1/-1

Group citation-key markers with JStyle

• Relocates the citation-key marker helper into jstyle.

jablib/src/main/java/org/jabref/logic/openoffice/jstyle/JStyleCitationKeyMarkers.java

JStyleCitationProcessor.javaGroup citation processing with JStyle +1/-1

Group citation processing with JStyle

• Moves the processor into jstyle alongside its formatting helpers.

jablib/src/main/java/org/jabref/logic/openoffice/jstyle/JStyleCitationProcessor.java

JStyleLoader.javaMove style loading into the JStyle family +1/-1

Move style loading into the JStyle family

• Relocates JStyleLoader to jstyle without changing its loading behavior.

jablib/src/main/java/org/jabref/logic/openoffice/jstyle/JStyleLoader.java

JStyleNumericCitationFormatter.javaGroup numeric citation formatting with JStyle +1/-1

Group numeric citation formatting with JStyle

• Relocates the numeric formatter into jstyle.

jablib/src/main/java/org/jabref/logic/openoffice/jstyle/JStyleNumericCitationFormatter.java

JStyleNumericMarkers.javaGroup numeric markers with JStyle +1/-1

Group numeric markers with JStyle

• Relocates the numeric marker helper into jstyle.

jablib/src/main/java/org/jabref/logic/openoffice/jstyle/JStyleNumericMarkers.java

OOStyle.javaRetain the shared style selection contract +2/-0

Retain the shared style selection contract

• Updates the sealed interface's permitted BST and JStyle implementations to their new packages.

jablib/src/main/java/org/jabref/logic/openoffice/style/OOStyle.java

WriterParagraphStyles.javaCentralize neutral Writer paragraph-style names +42/-0

Centralize neutral Writer paragraph-style names

• Introduces a family-neutral catalog for bibliography title and body styles and their default identifiers, extracted from CSLFormatUtils.

jablib/src/main/java/org/jabref/logic/openoffice/style/WriterParagraphStyles.java

JabRefCliPreferences.javaUpdate persisted style type imports +3/-3

Update persisted style type imports

• References relocated BST notation and style and JStyle types in CLI preferences.

jablib/src/main/java/org/jabref/logic/preferences/JabRefCliPreferences.java

BstPreviewLayout.javaUse the BST-family style in previews +1/-1

Use the BST-family style in previews

• Updates BstStyle's import to its new package.

jablib/src/main/java/org/jabref/logic/preview/BstPreviewLayout.java

OOFormat.javaRemove a model-to-logic markup dependency +10/-10

Remove a model-to-logic markup dependency

• Replaces StringUtil usage with a local nullable-or-empty style check and removes the architecture exemption. The paragraph markup paths retain their existing behavior.

jablib/src/main/java/org/jabref/model/openoffice/ootext/OOFormat.java

Tests (37) +222 / -68
OpenOfficeCitationControllerTest.javaAlign controller tests with relocated styles +2/-2

Align controller tests with relocated styles

• Updates BST and JStyle imports without changing test assertions.

jabgui/src/test/java/org/jabref/gui/openoffice/OpenOfficeCitationControllerTest.java

OpenOfficePanelTest.javaAlign panel tests with family packages +4/-4

Align panel tests with family packages

• Updates style and loader imports for the moved BST and JStyle classes.

jabgui/src/test/java/org/jabref/gui/openoffice/OpenOfficePanelTest.java

OpenOfficeStyleModeTest.javaUpdate style-mode test imports +2/-2

Update style-mode test imports

• References the relocated BST and JStyle types.

jabgui/src/test/java/org/jabref/gui/openoffice/OpenOfficeStyleModeTest.java

StyleSelectDialogViewModelTest.javaUpdate style selection model tests +4/-4

Update style selection model tests

• Imports the moved BST and JStyle types and loaders.

jabgui/src/test/java/org/jabref/gui/openoffice/StyleSelectDialogViewModelTest.java

StyleSelectDialogViewTest.javaUpdate style dialog view tests +5/-5

Update style dialog view tests

• Imports family-specific style types, loaders, and BST citation notation.

jabgui/src/test/java/org/jabref/gui/openoffice/StyleSelectDialogViewTest.java

LayoutEntryTest.javaTest the persisted OOPreFormatter layout name +9/-0

Test the persisted OOPreFormatter layout name

• Adds a layout evaluation test confirming the existing formatter name still converts LaTeX italics to markup.

jablib/src/test/java/org/jabref/logic/layout/LayoutEntryTest.java

OOPreFormatterTest.javaMove preformatter tests with the implementation +3/-1

Move preformatter tests with the implementation

• Relocates the test package to layout.format and adds a nullability annotation.

jablib/src/test/java/org/jabref/logic/layout/format/OOPreFormatterTest.java

BstStyleLoaderTest.javaMove BST loader tests to bst +1/-1

Move BST loader tests to bst

• Changes the test package to follow its relocated loader.

jablib/src/test/java/org/jabref/logic/openoffice/bst/BstStyleLoaderTest.java

BstStyleTest.javaMove BST style tests to bst +1/-1

Move BST style tests to bst

• Changes the test package to follow BstStyle.

jablib/src/test/java/org/jabref/logic/openoffice/bst/BstStyleTest.java

CSLFormatUtilsTest.javaTest preserved CSL bibliography defaults +15/-2

Test preserved CSL bibliography defaults

• Moves the tests to csl and adds cases for hanging-indent and ordinary body-style selection.

jablib/src/test/java/org/jabref/logic/openoffice/csl/CSLFormatUtilsTest.java

BstCitationFormatterTest.javaUpdate BST citation formatter tests +1/-1

Update BST citation formatter tests

• Imports BstStyle from its family package.

jablib/src/test/java/org/jabref/logic/openoffice/engine/BstCitationFormatterTest.java

BstRendererTest.javaUpdate BST renderer tests +2/-2

Update BST renderer tests

• Imports relocated BST notation and style types.

jablib/src/test/java/org/jabref/logic/openoffice/engine/BstRendererTest.java

CitationEngineTest.javaUpdate citation engine style imports +2/-2

Update citation engine style imports

• References BST and JStyle types in their new packages.

jablib/src/test/java/org/jabref/logic/openoffice/engine/CitationEngineTest.java

CitationFormatConverterTest.javaUpdate citation conversion test imports +2/-2

Update citation conversion test imports

• Uses relocated BST and JStyle types.

jablib/src/test/java/org/jabref/logic/openoffice/engine/CitationFormatConverterTest.java

CslRendererMarkupParityTest.javaUpdate CSL markup parity test import +1/-1

Update CSL markup parity test import

• Imports BST notation from bst for render options.

jablib/src/test/java/org/jabref/logic/openoffice/engine/CslRendererMarkupParityTest.java

CslRendererTest.javaUpdate CSL renderer test import +1/-1

Update CSL renderer test import

• Imports BstCitationFormat from its new package.

jablib/src/test/java/org/jabref/logic/openoffice/engine/CslRendererTest.java

JStyleRendererTest.javaUpdate JStyle renderer test imports +3/-3

Update JStyle renderer test imports

• References relocated JStyle types and BST citation notation.

jablib/src/test/java/org/jabref/logic/openoffice/engine/JStyleRendererTest.java

RenderContractTest.javaUpdate render contract test import +1/-1

Update render contract test import

• Uses BST citation notation from bst.

jablib/src/test/java/org/jabref/logic/openoffice/engine/RenderContractTest.java

RendererBenchmark.javaUpdate renderer benchmark style imports +4/-4

Update renderer benchmark style imports

• References relocated BST and JStyle classes.

jablib/src/test/java/org/jabref/logic/openoffice/engine/RendererBenchmark.java

RendererFactoryTest.javaUpdate renderer dispatch test imports +3/-3

Update renderer dispatch test imports

• Uses the family-package BST and JStyle implementations.

jablib/src/test/java/org/jabref/logic/openoffice/engine/RendererFactoryTest.java

RendererTestData.javaUpdate shared renderer test data +1/-1

Update shared renderer test data

• Imports BST citation notation from its new package.

jablib/src/test/java/org/jabref/logic/openoffice/engine/RendererTestData.java

UpdatePipelineTest.javaUpdate pipeline test style import +1/-1

Update pipeline test style import

• References JStyle in jstyle.

jablib/src/test/java/org/jabref/logic/openoffice/engine/UpdatePipelineTest.java

ZoteroCitationStrategyTest.javaUpdate Zotero strategy test imports +2/-2

Update Zotero strategy test imports

• References BST and JStyle implementations in their family packages.

jablib/src/test/java/org/jabref/logic/openoffice/engine/ZoteroCitationStrategyTest.java

CanonicalStorageWriterTest.javaUpdate canonical storage test imports +3/-3

Update canonical storage test imports

• Imports relocated BST notation and JStyle definition and loader.

jablib/src/test/java/org/jabref/logic/openoffice/engine/storage/CanonicalStorageWriterTest.java

LegacyJStyleMigrationWriterTest.javaUpdate JStyle migration test imports +2/-2

Update JStyle migration test imports

• References JStyle and its loader in jstyle.

jablib/src/test/java/org/jabref/logic/openoffice/integration/LegacyJStyleMigrationWriterTest.java

OOTextWriterTest.javaUpdate Writer markup integration test imports +2/-2

Update Writer markup integration test imports

• References relocated BST notation and style types.

jablib/src/test/java/org/jabref/logic/openoffice/integration/OOTextWriterTest.java

WriterIntegrationTest.javaUpdate Writer integration test style imports +4/-4

Update Writer integration test style imports

• Imports BST and JStyle family types from their new locations.

jablib/src/test/java/org/jabref/logic/openoffice/integration/WriterIntegrationTest.java

ZoteroWriterTest.javaUpdate Zotero Writer integration test imports +3/-3

Update Zotero Writer integration test imports

• Uses relocated BST and JStyle definitions and the JStyle loader.

jablib/src/test/java/org/jabref/logic/openoffice/integration/ZoteroWriterTest.java

JStyleCitationProcessorTest.javaMove JStyle processor tests with their subject +1/-1

Move JStyle processor tests with their subject

• Changes the test package to jstyle.

jablib/src/test/java/org/jabref/logic/openoffice/jstyle/JStyleCitationProcessorTest.java

JStyleLoaderTest.javaMove JStyle loader tests with their subject +1/-1

Move JStyle loader tests with their subject

• Changes the test package to jstyle.

jablib/src/test/java/org/jabref/logic/openoffice/jstyle/JStyleLoaderTest.java

JStyleTest.javaMove JStyle tests and update the default-layout fixture +3/-2

Move JStyle tests and update the default-layout fixture

• Moves the tests to jstyle, updates the OOPreFormatter import, and references the relocated, renamed default-first fixture.

jablib/src/test/java/org/jabref/logic/openoffice/jstyle/JStyleTest.java

JStyleTestHelper.javaKeep JStyle test support beside its tests +1/-1

Keep JStyle test support beside its tests

• Moves the helper into the jstyle test package.

jablib/src/test/java/org/jabref/logic/openoffice/jstyle/JStyleTestHelper.java

WriterParagraphStylesTest.javaGuard the neutral Writer style catalog +82/-0

Guard the neutral Writer style catalog

• Checks bibliography style identifiers, ordering, immutability, and default names.

jablib/src/test/java/org/jabref/logic/openoffice/style/WriterParagraphStylesTest.java

JabRefCliPreferencesTest.javaUpdate preference serialization test imports +3/-3

Update preference serialization test imports

• References relocated BST and JStyle types and the JStyle loader.

jablib/src/test/java/org/jabref/logic/preferences/JabRefCliPreferencesTest.java

OOFormatTest.javaCover paragraph-style markup compatibility +47/-0

Cover paragraph-style markup compatibility

• Tests null, empty, whitespace-only, and named paragraph styles after removing OOFormat's logic utility dependency.

jablib/src/test/java/org/jabref/model/openoffice/ootext/OOFormatTest.java

test.jstyleRelocate the JStyle test fixture +0/-0

Relocate the JStyle test fixture

• Moves the package-relative fixture alongside the relocated JStyle tests without changing its contents.

jablib/src/test/resources/org/jabref/logic/openoffice/jstyle/test.jstyle

testWithDefaultLayoutFirst.jstyleRelocate and clarify the default-first JStyle fixture +0/-0

Relocate and clarify the default-first JStyle fixture

• Moves the package-relative fixture and gives it a name describing the default-layout-first case; its contents are unchanged.

jablib/src/test/resources/org/jabref/logic/openoffice/jstyle/testWithDefaultLayoutFirst.jstyle

Documentation (10) +87 / -14
code-reorganization.mdDocument Writer package ownership +24/-11

Document Writer package ownership

• Defines responsibilities for style-family packages, shared styles, the engine, layout formatting, and the model. Updates guidance on tests and package-relative fixtures.

docs/code-howtos/openoffice/code-reorganization.md

overview.mdSummarize the new Writer package boundaries +4/-0

Summarize the new Writer package boundaries

• Adds a concise map of family helpers, shared style contracts, layout formatting, and engine ownership.

docs/code-howtos/openoffice/overview.md

package-info.javaCorrect Writer GUI package documentation +1/-1

Correct Writer GUI package documentation

• Updates package documentation links to the relocated JStyle and BST loaders.

jabgui/src/main/java/org/jabref/gui/openoffice/package-info.java

HtmlToLatexFormatter.javaCorrect the OOPreFormatter documentation link +1/-1

Correct the OOPreFormatter documentation link

• Points the formatter's documentation to the shared layout-format package.

jablib/src/main/java/org/jabref/logic/formatter/bibtexfields/HtmlToLatexFormatter.java

package-info.javaDocument shared layout formatter ownership +9/-0

Document shared layout formatter ownership

• Describes formatter resolution and the boundary between layout evaluation and Writer document operations.

jablib/src/main/java/org/jabref/logic/layout/format/package-info.java

package-info.javaDocument BST package responsibilities +11/-0

Document BST package responsibilities

• Identifies BST loading, notation, conversion, and the separate engine rendering boundary.

jablib/src/main/java/org/jabref/logic/openoffice/bst/package-info.java

package-info.javaDocument Writer-specific CSL adaptation +11/-0

Document Writer-specific CSL adaptation

• Distinguishes Writer markup adaptation from application-wide CSL loading and metadata.

jablib/src/main/java/org/jabref/logic/openoffice/csl/package-info.java

package-info.javaDocument JStyle family boundaries +12/-0

Document JStyle family boundaries

• Describes JStyle loading and formatting while keeping shared contracts and document rendering in separate packages.

jablib/src/main/java/org/jabref/logic/openoffice/jstyle/package-info.java

package-info.javaDocument common Writer style ownership +13/-0

Document common Writer style ownership

• Defines the shared selection contract and paragraph-style catalog boundary.

jablib/src/main/java/org/jabref/logic/openoffice/style/package-info.java

CitationStyleGeneratorTest.javaCorrect a CSL test documentation link +1/-1

Correct a CSL test documentation link

• Points the alphanumeric-citation reference to the relocated CSLFormatUtils.

jablib/src/test/java/org/jabref/logic/citationstyle/CitationStyleGeneratorTest.java

Other (1) +4 / -1
module-info.javaExport the new Writer family packages +4/-1

Export the new Writer family packages

• Exports csl and jstyle, removes the obsolete oocsltext export, and documents the package split.

jablib/src/main/java/module-info.java

@qodo-free-for-open-source-projects

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can keep summaries lean with Findings visible per group, which tucks the rest behind a View link

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@subhramit subhramit changed the title OpenOffice Backend Re-architecture B - Package reorganization OpenOffice Backend re-architecture B - Package reorganization Nov 23, 2026
@qodo-free-for-open-source-projects

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can keep summaries lean with Findings visible per group, which tucks the rest behind a View link

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@subhramit
subhramit enabled auto-merge November 23, 2026 22:22
@subhramit subhramit added the dev: send-to-black-forest Port to the black-forest branch of JabRef/jabref-black-forest after merging (ADR-0073) label Nov 23, 2026
@github-actions github-actions Bot added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Nov 23, 2026
@subhramit
subhramit added this pull request to the merge queue Nov 23, 2026
@github-actions github-actions Bot added status: to-be-merged PRs which are accepted and should go into the merge-queue. and removed status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers labels Nov 23, 2026

@calixtus calixtus left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Skimmed it, looks good so far.
As far as i see mostly just reorganization.

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 23, 2026
@koppor
koppor added this pull request to the merge queue Nov 24, 2026
@koppor

koppor commented Nov 24, 2026

Copy link
Copy Markdown
Member

Merge queue hickup:

> Task :jablib:test

OAuthSessionRegistryTest > abandonedLoginTimesOutAndIsRemoved() FAILED
    org.opentest4j.AssertionFailedError: expected: <false> but was: <true>
        at app/org.junit.jupiter.api@6.1.3/org.junit.jupiter.api.Assertions.assertFalse(Assertions.java:257)
        at app/org.jabref.jablib/org.jabref.logic.citedrive.OAuthSessionRegistryTest.abandonedLoginTimesOutAndIsRemoved(OAuthSessionRegistryTest.java:44)

Merged via the queue into main with commit ecb8ff7 Nov 24, 2026
142 of 180 checks passed
@koppor
koppor deleted the organize-writer-style-packages branch November 24, 2026 00:47
@jabref-machine

Copy link
Copy Markdown
Collaborator

Created backport PR for black-forest:

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin port-17918-to-black-forest
git worktree add --checkout .worktree/port-17918-to-black-forest port-17918-to-black-forest
cd .worktree/port-17918-to-black-forest
git reset --hard HEAD^
git cherry-pick -x ecb8ff76cb4678846527425629975672e003d239

koppor added a commit to JabRef/jabref-koppor that referenced this pull request Nov 25, 2026
…ntal

Conflicts from landed OpenOffice re-architecture (JabRef#17673, JabRef#17918), keyring bundle (JabRef#17868)
and backup undo (JabRef#17493): main's version taken; stale files of their pre-landing branches removed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: entry-preview component: export-or-save component: libre-office component: preferences dev: architecture dev: code-quality Issues related to code or architecture decisions dev: send-to-black-forest Port to the black-forest branch of JabRef/jabref-black-forest after merging (ADR-0073) size: big status: to-be-merged PRs which are accepted and should go into the merge-queue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants