@@ -56,41 +56,8 @@ public List<Action> build(Menu menu, Object object) {
5656 }
5757
5858 public interface Input extends ActionInput , MenuElement {
59- static ActionInput create (String input ) {
60- input = input .trim ();
61-
62- // Find the colon to separate type/option from value
63- int colonIndex = input .indexOf (':' );
64- String typeOptionPart = colonIndex == -1 ? input : input .substring (0 , colonIndex );
65- String value = colonIndex == -1 ? "" : input .substring (colonIndex + 1 ).trim ();
66-
67- typeOptionPart = typeOptionPart .trim ();
68-
69- // Find the opening parenthesis to separate type from option
70- int openParenIndex = typeOptionPart .indexOf ('(' );
71- String type ;
72- String option = "" ;
73-
74- if (openParenIndex == -1 ) {
75- type = typeOptionPart ;
76- } else {
77- type = typeOptionPart .substring (0 , openParenIndex ).trim ();
78- int closeParenIndex = typeOptionPart .lastIndexOf (')' );
79- if (closeParenIndex > openParenIndex ) {
80- option = typeOptionPart .substring (openParenIndex + 1 , closeParenIndex ).trim ();
81- }
82- }
83-
84- // If no type is found, use the entire input as value
85- if (type .isEmpty () && value .isEmpty ()) {
86- return ActionInput .create ("" , "" , input );
87- }
88-
89- return ActionInput .create (type , option , value );
90- }
91-
9259 static Input create (Menu menu , String input ) {
93- ActionInput actionInput = create (input );
60+ ActionInput actionInput = ActionInput . create (input );
9461 return new Input () {
9562 @ Override
9663 public String getType () {
0 commit comments