Skip to content

Conversation

@Amadeus1791
Copy link

This Pr connects the MostRecentlyUsedTracker (from PR #1799 ) to the element creation workflow. Now when users create function blocks via the search dialog, the tracker automatically records usage for later retrieval.

Changes:

  • Add MRU tracker instance to NewInstanceCellEditor
  • Initialize tracker in setTypeLibrary() with project from TypeLibrary
  • Record usage in doGetValue() when element is selected
  • Add debug output to verify tracking is working

This enables automatic MRU tracking without requiring any user action. Debug output will now appear in the console showing MRU list updates as users create function blocks.

Depends on: PR #1 (MRU infrastructure)

How to Verify

  1. Open an FB editor in a project.
  2. Create FBs via type-to-search
  3. Check console for debug prints
  4. Verify per-project prefs file (project/.settings/org.eclipse.fordiac.ide.gef.prefs) updates with the MRU list.
  5. Test edge cases: Delete project -> no errors; new project -> empty MRU.

UI display of MRU items will come in follow-up PR

@github-actions
Copy link

github-actions bot commented Nov 20, 2025

Test Results

  110 files  ±0    110 suites  ±0   1m 7s ⏱️ -1s
6 099 tests ±0  6 099 ✅ ±0  0 💤 ±0  0 ❌ ±0 
6 100 runs  ±0  6 100 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit d1975a6. ± Comparison against base commit 5ece39a.

This pull request removes 29 and adds 11 tests. Note that renamed tests count towards both.

 
  *
  Multi-line comment
 Multi-line comment
 comment *)->
 comment */->
(*
*)
*/
…
org.eclipse.fordiac.ide.test.model.util.StringTransformTest ‑ transformStringName(String, String) 10: (*
 Multi-line comment
*)
s := "Hello   World!";
->s:="Hello   World!";
org.eclipse.fordiac.ide.test.model.util.StringTransformTest ‑ transformStringName(String, String) 11: /*
 Multi-line comment
*/
s := "Hello   World!";
->s:="Hello   World!";
org.eclipse.fordiac.ide.test.model.util.StringTransformTest ‑ transformStringName(String, String) 15: whitespace at the end 
->whitespace at the end
org.eclipse.fordiac.ide.test.model.util.StringTransformTest ‑ transformStringName(String, String) 22: test unclosed multine comment
(*
  Multi-line comment
  *
->test unclosed multine comment
org.eclipse.fordiac.ide.test.model.util.StringTransformTest ‑ transformStringName(String, String) 23: test unclosed multine comment
(*
  Multi-line comment

->test unclosed multine comment
org.eclipse.fordiac.ide.test.model.util.StringTransformTest ‑ transformStringName(String, String) 24: test unclosed multine comment
/*
  Multi-line comment
  *
->test unclosed multine comment
org.eclipse.fordiac.ide.test.model.util.StringTransformTest ‑ transformStringName(String, String) 25: test unclosed multine comment
/*
  Multi-line comment

->test unclosed multine comment
org.eclipse.fordiac.ide.test.model.util.StringTransformTest ‑ transformStringName(String, String) 5: (* This is a multi-line 
 
 comment *)->
org.eclipse.fordiac.ide.test.model.util.StringTransformTest ‑ transformStringName(String, String) 6: /* This is a multi-line 
 
 comment */->
org.eclipse.fordiac.ide.test.model.util.StringTransformTest ‑ transformStringName(String, String) 8: // This is a single-line  
test->test
…

♻️ This comment has been updated with latest results.

@azoitl
Copy link
Contributor

azoitl commented Nov 21, 2025

@Amadeus1791 can you please rebase your commit on top of develop and force push it so that we get a cleaner history. This would help me to review and test.

@Amadeus1791 Amadeus1791 force-pushed the feature/mru-integration branch from 469d0ec to d1975a6 Compare November 25, 2025 10:14
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