[MGNLUI-407] Adapt ActionbarPresenter to use varargs as params for methods often called multiple times in a row Created: 13/Dec/12  Updated: 11/Feb/13  Resolved: 14/Dec/12

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: 5.0
Fix Version/s: 5.0

Type: Improvement Priority: Neutral
Reporter: Daniel Lipp Assignee: Daniel Lipp
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
depends upon MGNLUI-408 Refactor ActionbarPresenter for bette... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)

 Description   

Currently ActionbarPresenter e.g. only offers enable(String) and disable(String). In most scenarios there's actually a few actions that have to be enabled or disabled. Having enable / disable with varargs String (String...) as param could make this code much nicer.

e.g.
actionbar.enable("addFolder");
actionbar.enable("addNode");
actionbar.enable("addProperty");
actionbar.enable("delete");

could be written as
actionbar.enable("addFolder", "addNode", "addProperty", "delete");



 Comments   
Comment by Daniel Lipp [ 14/Dec/12 ]

Changes cannot be covered by tests until MGNLUI-408 is done.

Comment by Daniel Lipp [ 14/Dec/12 ]

New varargs methods cannot be unit tested until MGNLUI-408 is fixed.

Generated at Mon Feb 12 08:36:35 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.