valepakh commented on code in PR #986:
URL: https://github.com/apache/ignite-3/pull/986#discussion_r944373042


##########
modules/cli/src/main/java/org/apache/ignite/cli/core/style/component/MessageUiComponent.java:
##########
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.cli.core.style.component;
+
+import static org.apache.ignite.cli.core.style.AnsiStringSupport.ansi;
+
+import org.apache.ignite.cli.core.style.element.UiElement;
+import org.apache.ignite.cli.core.style.element.UiString;
+
+/**
+ * UI component that represents a message.
+ */
+public class MessageUiComponent implements UiComponent {
+
+    private final String message;
+
+    private final UiElement[] messageUiElements;
+
+    private final String hint;
+
+    private final UiElement[] hintUiElements;
+
+    private MessageUiComponent(
+            String message,
+            UiElement[] messageUiElements,
+            String hint,
+            UiElement[] hintUiElements) {
+        this.message = message;
+        this.messageUiElements = messageUiElements;
+        this.hint = hint;
+        this.hintUiElements = hintUiElements;
+    }
+
+    @Override
+    public String render() {
+        return ansi(
+                UiString.format(message, messageUiElements)
+                        + (UiString.format(hint, hintUiElements) == null ? ""

Review Comment:
   Maybe it's worth to extract this to a variable? It's hard to follow the 
logic.



##########
modules/cli/src/main/java/org/apache/ignite/cli/deprecated/spec/NodeCommandSpec.java:
##########
@@ -60,45 +63,22 @@ public class NodeCommandSpec {
     /**
      * Starts Ignite node command.
      */
-    @Command(name = "start", description = "Starts an Ignite node locally.")
+    @Command(name = "start", description = "Starts an Ignite node locally")
     @Singleton
     public static class StartNodeCommandSpec extends BaseCommand implements 
Callable<Integer> {
 
+        /** Consistent id, which will be used by new node. */
+        @Parameters(paramLabel = "name", description = "Name of the new node")
+        public String nodeName;
         /** Loader for Ignite distributive paths. */
         @Inject
         private CliPathsConfigLoader cliPathsCfgLdr;
-

Review Comment:
   Looks like some of the line breaks got removed during the merge and 
ConfigOptions class is again at the bottom.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to