core: decide how to split persisted graphic values from UI rendering

Open
#1,695 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
java

Research direction

Start with the graphic section of the debt ledger, then use the listed git grep commands to trace references and transient fields in core. Follow POD serialization through ObjectOutputStream and SafeObjectInput, and MPO persistence through modules/microproject_exchange. Compare the two proposed approaches against POD and MPO compatibility, rendering differences, and effort; comment with the persisted types, UI move boundaries, recommendation, and required round-trip checks.

Written by the indexing model from the issue text.

Description

area: architecture area: core enhancement priority: low status: ready

概要

core の com.microproject.view.configuration と java.awt の値型は debt ledger に 84 行として記録されている。これらには POD/MPO ファイルに Java バイナリ保存される Project.ganttBarFormatOverrides / Dictionary のカタログ系フィールドと、表示専用の描画処理が混在している。#737 の方針決定として、永続化が必要な値と UI 描画責務の切り分け案を調査し、結論をコメントする。

作業手順

  1. debt ledger の graphic セクションに載っている core クラスを一覧化し、それぞれが Project / Dictionary / PrintSettings / GlobalPreferences / configuration.xml のどこから参照されているかを git grep で調べる。
  2. 各フィールドが transient かどうかを確認し、POD の ObjectOutputStream (SafeObjectInput)で実際に class name が保存される型を特定する。MPO 側の保存経路も modules/microproject_exchange で追う。
  3. TexturedShape、Colors、PredefinedPaint / PredefinedShape / PredefinedStroke、CellFormat の java.awt.Color / Font / Paint / Shape の使用を読み、保存される値と実行時に描画する値を分ける。
  4. 選択肢を (A) 永続化値は既存のままで残し、描画処理だけ UI へ移す、(B) 永続化値を core のプレーンなデータ型に置き換えて ClassRelocations と round-trip テストを追加する、の 2 つに絞り、POD fixture のバイト列、MPO の旧バージョン読込、UI の描画差、実装工数で比較する。
  5. 結論と根拠、採用した場合の分割手順をコメントに書く。ファイル形式を変える選択を含むため、結論は所有者の判断を仰ぐ。

検証

  • git grep -n "com.microproject.view.configuration" -- modules/microproject_core/src/main/java
  • git grep -n "ganttBarFormatOverrides\|SpreadSheetFieldArray\|BarStyles\|CellStyles\|ActionLists" -- modules/microproject_core/src/main/java
  • git grep -n "transient" -- modules/microproject_core/src/main/java/com/microproject/model/task/Project.java
  • コードは変更しないため、ビルドコマンドは不要。

完了条件

  • 永続化が必要な型の一覧と、その型名が POD/MPO のどの経路で保存されるかが issue コメントに書かれている
  • 描画専用の処理として UI へ移せる範囲と、移動時に必要な API がコメントに書かれている
  • 方針 (A) または (B) と、採用前に必要な round-trip 検証がコメントに書かれている

範囲外

  • graphic configuration の実移行。方針決定後に別の実装 issue で扱う。
  • undo、tree、print の境界(別の調査 issue で扱う)。
Dominant language
Java
Stars
2
Forks
1
Avg merge
4h 52m
Merged PRs (30d)
349

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tetsuji16/microProject

All issues in tetsuji16/microProject

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.