Copilot commented on code in PR #3385:
URL: 
https://github.com/apache/incubator-kie-tools/pull/3385#discussion_r2644621681


##########
packages/bpmn-editor/src/mutations/addEdgeWaypoint.ts:
##########
@@ -0,0 +1,50 @@
+/*
+ * 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.
+ */
+
+import { BPMN20__tDefinitions } from 
"@kie-tools/bpmn-marshaller/dist/schemas/bpmn-2_0/ts-gen/types";
+import { DC__Point } from 
"@kie-tools/xyflow-react-kie-diagram/dist/maths/model";
+import { Normalized } from "../normalization/normalize";
+import { addOrGetProcessAndDiagramElements } from 
"./addOrGetProcessAndDiagramElements";
+
+export function addEdgeWaypoint({
+  definitions,
+  __readonly_edgeIndex,
+  __readonly_beforeIndex,
+  __readonly_waypoint,
+}: {
+  definitions: Normalized<BPMN20__tDefinitions>;
+  __readonly_edgeIndex: number;
+  __readonly_beforeIndex: number;
+  __readonly_waypoint: DC__Point;
+}) {
+  const { diagramElements } = addOrGetProcessAndDiagramElements({ definitions 
});
+
+  const diagramElement = diagramElements[__readonly_edgeIndex];
+  if (diagramElement.__$$element !== "bpmndi:BPMNEdge") {
+    throw new Error("DMN MUTATION: Can't remove a waypoint from an element 
that is not a DMNEdge.");
+  }
+
+  if (__readonly_beforeIndex > (diagramElement["di:waypoint"]?.length ?? 0) - 
1) {
+    throw new Error(
+      `DMN MUTATION: Can't add waypoint before index 
'${__readonly_beforeIndex}' to DMNEdge '${diagramElement["@_id"]}' because the 
waypoint array is smaller than 'beforeIndex' requires.`

Review Comment:
   Error message incorrectly references "DMN MUTATION" and "DMNEdge" in a BPMN 
editor file. Should reference "BPMN MUTATION" and "BPMNEdge" instead.
   ```suggestion
       throw new Error("BPMN MUTATION: Can't remove a waypoint from an element 
that is not a BPMNEdge.");
     }
   
     if (__readonly_beforeIndex > (diagramElement["di:waypoint"]?.length ?? 0) 
- 1) {
       throw new Error(
         `BPMN MUTATION: Can't add waypoint before index 
'${__readonly_beforeIndex}' to BPMNEdge '${diagramElement["@_id"]}' because the 
waypoint array is smaller than 'beforeIndex' requires.`
   ```



##########
packages/bpmn-editor/src/i18n/locales/en.ts:
##########
@@ -0,0 +1,364 @@
+/*
+ * 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

Review Comment:
   Corrected spelling of 'License);' to 'License");'
   ```suggestion
    * "License"); you may not use this file except in compliance
   ```



##########
packages/bpmn-editor/src/i18n/BpmnEditorI18n.ts:
##########
@@ -0,0 +1,361 @@
+/*
+ * 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.
+ */
+
+import { ReferenceDictionary } from "@kie-tools-core/i18n/dist/core";
+import { CommonI18n } from "@kie-tools/i18n-common-dictionary";
+
+interface BpmnEditorDictionary
+  extends ReferenceDictionary<{
+    customTasks: {
+      emptyStateBody: string;
+    };
+    nodeLabel: {
+      placeHolder: string;
+    };
+    bpmnDiagramEmptyState: {
+      emptyBpmnTitle: string;
+      emptyBpmnBody: string;
+      startByDraggingNodes: string;
+    };
+    bpmnTopRightPanels: {
+      overlays: string;
+      propertiesPanel: string;
+    };
+    bpmnPalette: {
+      processVariables: string;
+      addVariable: string;
+      noVariables: string;
+      noVariablesYet: string;
+      emptyBpmnBody: string;
+      variables: string;
+      correlations: string;
+      startEvents: string;
+      intermediateCatchEvents: string;
+      intermediateThrowEvents: string;
+      endEvents: string;
+      tasks: string;
+      callActivity: string;
+      subProcesses: string;
+      gateways: string;
+      lanes: string;
+      dataObject: string;
+      group: string;
+      textAnnotation: string;
+      customTasks: string;
+      propertiesManagement: string;
+    };
+    versionUpgraded: string;
+    bpmnLatestVersion: string;
+    importedBpmn: (propsVersion: string, bpmnLatestVersion: string) => string;
+    newInBpmn: (bpmnLatestVersion: string) => string;
+    enableStyles: string;
+    unknown: string;
+    undefined: string;
+    unnamed: string;
+    correlation: {
+      properties: string;
+      messageBindings: string;
+      expressionPlaceHolder: string;
+      keys: string;
+      addProperty: string;
+      propertiesIncluded: string;
+      subscriptions: string;
+      valueOrExpressionPlaceHolder: string;
+      addSubscriptions: (selectedKey: string) => string;
+      correlationEmptyState: (selectedKey: string) => string;
+      noCorrelationKeys: string;
+      noCorrelationKeysYet: string;
+      correlationsKeyEmptyBody: string;
+      addCorrelationKey: string;
+      noCorrelations: string;
+      noCorrelationsYet: string;
+      correlationEmptyBody: string;
+      addCorrelationProperty: string;
+    };
+    dataMapping: {
+      title: string;
+      manage: string;
+      mappingForElement: (elementName: string) => string;
+      inputs: string;
+      outputs: string;
+      save: string;
+      input: string;
+      output: string;
+      name: string;
+      dataType: string;
+      namePlaceholder: string;
+      noWhiteSpaces: string;
+      noDataMappings: (entryTitle: string) => string;
+      noDataMappingsYet: (entryTitle: string) => string;
+      addDataMapping: (entryTitle: string) => string;
+    };
+    eventDefinitionProperties: {
+      message: string;
+      signal: string;
+      errorCode: string;
+      escalationCode: string;
+    };
+    propertiesPanel: {
+      endEvent: string;
+      activity: string;
+      adhocAutoStart: string;
+      async: string;
+      calledElement: string;
+      codePlaceholder: string;
+      conditionalExpression: string;
+      defaultRoute: string;
+      none: string;
+      noneYet: string;
+      createError: string;
+      createEscalation: string;
+      name: string;
+      classNamePlaceholder: string;
+      createDataType: string;
+      link: string;
+      createMessage: string;
+      value: string;
+      namePlaceholder: string;
+      valuePlaceholder: string;
+      executionMode: string;
+      sequential: string;
+      completionCondition: string;
+      collectionInput: string;
+      dataInput: string;
+      dataInputPlaceholder: string;
+      dataType: string;
+      collectionOutput: string;
+      dataOutput: string;
+      dataOutputPlaceholder: string;
+      multiInstance: string;
+      enterNamePlaceholder: string;
+      id: string;
+      documentation: string;
+      documentationPlaceholder: string;
+      copy: string;
+      copied: string;
+      manage: string;
+      notificationsProperties: {
+        notifications: string;
+        expiresAt: string;
+        from: string;
+        toUser: string;
+        toGroup: string;
+        toEmail: string;
+        replyTo: string;
+        subject: string;
+        body: string;
+        expiresPlaceholder: string;
+        fromPlaceholder: string;
+        toUserPlaceholder: string;
+        toGroupPlaceholder: string;
+        toEmailPlaceholder: string;
+        subjectPlaceholder: string;
+        replyPlaceholder: string;
+        bodyPlaceholder: string;
+        noNotifications: string;
+        addNotifications: string;
+        emptyNotificationMessage: string;
+      };
+      save: string;
+      onEntry: string;
+      onExit: string;
+      reassignments: string;
+      users: string;
+      groups: string;
+      type: string;
+      period: string;
+      usersPlaceholder: string;
+      groupsPlaceholder: string;
+      periodPlaceholder: string;
+      addReassignment: string;
+      emptyReassignmentMessage: string;
+      noReassignMents: string;
+      signalScope: string;
+      createSignal: string;
+      priority: string;
+      priorityPlaceholder: string;
+      slaDuedate: string;
+      datePlaceholder: string;
+      timerOptions: string;
+      fireOnceAfterDuration: string;
+      durationPlaceholder: string;
+      fireMultipleTimes: string;
+      timePlaceholder: string;
+      iso: string;
+      cron: string;
+      fireAtspecificDate: string;
+      fireAtspecificDatePlaceholder: string;
+      tags: string;
+      variables: string;
+      addCustomtag: string;
+      addCustomtagPlaceholder: string;
+      enteringExpressions: string;
+      noVariablesYet: string;
+      expr: string;
+      var: string;
+      expression: string;
+      process: string;
+      close: string;
+      adhoc: string;
+      imports: string;
+      metadata: string;
+      idNamespace: string;
+      regenerateIdNamespace: string;
+      idPlaceholder: string;
+      namespace: string;
+      namespacePlaceholder: string;
+      misc: string;
+      expressionLanguage: string;
+      expressionLanguagePlaceholder: string;
+      private: string;
+      public: string;
+      executable: string;
+      packageName: string;
+      packageNamePlaceholder: string;
+      version: string;
+      versionPlaceholder: string;
+      processInstanceDescription: string;
+      processInstanceDescriptionPlaceholder: string;
+      regenerateId: string;
+      regenerateMessage: string;
+      continueMessage: string;
+      cancel: string;
+      edgesNodesSelected: (size: number) => string;
+      cantEditProperties: string;
+      selectOnlyNodes: string;
+      selectOnlyEdges: string;
+      multipleEdgesSelected: (size: number) => string;
+      multipleNodesSelected: (size: number) => string;
+      sequenceFlow: string;
+      association: string;
+      unsupported: string;
+      noPropertiesToEdit: string;
+      noMatches: string;
+      undefined: string;
+      empty: string;
+      unexpectedError: string;
+      bugReport: string;
+      undoAction: string;
+      fileAnIssue: string;
+    };
+    singleNodeProperties: {
+      close: string;
+      adhocSubprocess: string;
+      adhocOrdering: string;
+      parallel: string;
+      adhocActivationCondition: string;
+      adhocCompletionCondiion: string;

Review Comment:
   Corrected spelling of 'Condiion' to 'Condition'
   ```suggestion
         adhocCompletionCondition: string;
   ```



##########
packages/bpmn-editor/src/mutations/addEdgeWaypoint.ts:
##########
@@ -0,0 +1,50 @@
+/*
+ * 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.
+ */
+
+import { BPMN20__tDefinitions } from 
"@kie-tools/bpmn-marshaller/dist/schemas/bpmn-2_0/ts-gen/types";
+import { DC__Point } from 
"@kie-tools/xyflow-react-kie-diagram/dist/maths/model";
+import { Normalized } from "../normalization/normalize";
+import { addOrGetProcessAndDiagramElements } from 
"./addOrGetProcessAndDiagramElements";
+
+export function addEdgeWaypoint({
+  definitions,
+  __readonly_edgeIndex,
+  __readonly_beforeIndex,
+  __readonly_waypoint,
+}: {
+  definitions: Normalized<BPMN20__tDefinitions>;
+  __readonly_edgeIndex: number;
+  __readonly_beforeIndex: number;
+  __readonly_waypoint: DC__Point;
+}) {
+  const { diagramElements } = addOrGetProcessAndDiagramElements({ definitions 
});
+
+  const diagramElement = diagramElements[__readonly_edgeIndex];
+  if (diagramElement.__$$element !== "bpmndi:BPMNEdge") {
+    throw new Error("DMN MUTATION: Can't remove a waypoint from an element 
that is not a DMNEdge.");
+  }
+
+  if (__readonly_beforeIndex > (diagramElement["di:waypoint"]?.length ?? 0) - 
1) {
+    throw new Error(
+      `DMN MUTATION: Can't add waypoint before index 
'${__readonly_beforeIndex}' to DMNEdge '${diagramElement["@_id"]}' because the 
waypoint array is smaller than 'beforeIndex' requires.`

Review Comment:
   Error message incorrectly references "DMN MUTATION" and "DMNEdge" in a BPMN 
editor file. Should reference "BPMN MUTATION" and "BPMNEdge" instead.
   ```suggestion
       throw new Error("BPMN MUTATION: Can't remove a waypoint from an element 
that is not a BPMNEdge.");
     }
   
     if (__readonly_beforeIndex > (diagramElement["di:waypoint"]?.length ?? 0) 
- 1) {
       throw new Error(
         `BPMN MUTATION: Can't add waypoint before index 
'${__readonly_beforeIndex}' to BPMNEdge '${diagramElement["@_id"]}' because the 
waypoint array is smaller than 'beforeIndex' requires.`
   ```



##########
packages/bpmn-editor/src/i18n/BpmnEditorI18n.ts:
##########
@@ -0,0 +1,361 @@
+/*
+ * 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

Review Comment:
   Corrected spelling of 'License);' to 'License");'
   ```suggestion
    * "License"); you may not use this file except in compliance
   ```



##########
packages/bpmn-editor/src/diagram/nodes/Nodes.css:
##########
@@ -0,0 +1,32 @@
+/*
+ * 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

Review Comment:
   Corrected spelling of 'License);' to 'License");'



##########
packages/bpmn-editor/src/i18n/setup.ts:
##########
@@ -0,0 +1,36 @@
+/*
+ * 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

Review Comment:
   Corrected spelling of 'License);' to 'License");'
   ```suggestion
    * "License"); you may not use this file except in compliance
   ```



##########
packages/bpmn-editor/src/diagram/nodes/Nodes.css:
##########
@@ -0,0 +1,32 @@
+/*
+ * 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

Review Comment:
   Corrected spelling of 'License);' to 'License");'
   ```suggestion
    * "License"); you may not use this file except in compliance
   ```



##########
packages/bpmn-editor/src/i18n/index.ts:
##########
@@ -0,0 +1,21 @@
+/*
+ * 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

Review Comment:
   Corrected spelling of 'License);' to 'License");'
   ```suggestion
    *  "License"); you may not use this file except in compliance
   ```



##########
packages/bpmn-editor/src/i18n/locales/index.ts:
##########
@@ -0,0 +1,20 @@
+/*
+ * 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

Review Comment:
   Corrected spelling of 'License);' to 'License");'
   ```suggestion
    * "License"); you may not use this file except in compliance
   ```



##########
packages/bpmn-editor/src/diagram/nodes/morphing/NodeMorphingPanel.css:
##########
@@ -0,0 +1,148 @@
+/*
+ * 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 1.0 (the

Review Comment:
   Corrected spelling of 'Version 1.0' to 'Version 2.0'
   ```suggestion
    * to you under the Apache License, Version 2.0 (the
   ```



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to