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


##########
packages/stunner-editors/kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-kogito-runtime/src/main/java/org/kie/workbench/common/stunner/kogito/client/services/WorkItemDefinitionStandaloneClientService.java:
##########
@@ -198,7 +209,10 @@ String getMilestoneIconAsBase64() {
     }
 
     private Promise<Collection<WorkItemDefinition>> getPromises(final 
List<WorkItemDefinition> wids, final Collection<WorkItemDefinition> loaded, 
final String path) {
-        wids.forEach(w -> w.getIconDefinition().setUri(path + 
w.getIconDefinition().getUri()));
+        wids.forEach(w -> {
+            LOGGER.log(Level.INFO, "WID Icon: " + path + 
w.getIconDefinition().getUri());

Review Comment:
   Production code should use appropriate logging levels. Level.INFO is being 
used for what appears to be debug/trace information about WID searching and 
icon paths. These should be logged at Level.FINE or Level.FINER instead of 
Level.INFO to avoid cluttering production logs with detailed debugging 
information.
   ```suggestion
               LOGGER.log(Level.FINE, "WID Icon: " + path + 
w.getIconDefinition().getUri());
   ```



##########
packages/vscode-extension/src/workspace/VsCodeResourceContentServiceForWorkspaces.ts:
##########
@@ -73,48 +74,110 @@ export class VsCodeResourceContentServiceForWorkspaces 
implements ResourceConten
 
       const minimatch = new Minimatch(pattern);
       const regexp = minimatch.makeRe(); // The regexp is ~50x faster than the 
direct match using glob.
+      // e.g. src/main/resources/com/my/module
       const openFileDirectoryNormalizedPosixPathRelativeToTheWorkspaceRoot = 
__path.dirname(
         getNormalizedPosixPathRelativeToWorkspaceRoot(this.args.document)
       );
 
-      const matchingNormalizedPosixPathsRelativeToTheBasePath = 
normalizedPosixPathsRelativeToTheBasePath.filter(
-        (p) => {
-          const matchesPattern =
-            // Adding a leading slash here to make the regex have the same 
behavior as the glob with **/* pattern.
-            regexp.test("/" + p) ||
-            // check on the asset folder for *.{ext} pattern
-            // the regex doesn't support "\" from Windows paths, requiring to 
test againts POSIX paths
-            
regexp.test(__path.posix.relative(openFileDirectoryNormalizedPosixPathRelativeToTheWorkspaceRoot,
 p));
-
-          const conformsToSearchType =
-            !opts ||
-            opts.type === SearchType.TRAVERSAL ||
-            (opts.type === SearchType.ASSET_FOLDER &&
-              __path
-                .join(baseAbsoluteFsPath, toFsPath(p))
-                .startsWith(
-                  __path.join(
-                    baseAbsoluteFsPath,
-                    
toFsPath(openFileDirectoryNormalizedPosixPathRelativeToTheWorkspaceRoot)
-                  )
-                ));
-
-          return matchesPattern && conformsToSearchType;
-        }
-      );
-      return new ResourcesList(pattern, 
matchingNormalizedPosixPathsRelativeToTheBasePath);
+      gitNormalizedPosixPathsRelativeToTheBasePath = 
normalizedPosixPathsRelativeToTheBasePath.filter((p) => {
+        const matchesPattern =
+          // Adding a leading slash here to make the regex have the same 
behavior as the glob with **/* pattern.
+          regexp.test("/" + p) ||
+          // check on the asset folder for *.{ext} pattern
+          // the regex doesn't support "\" from Windows paths, requiring to 
test againts POSIX paths

Review Comment:
   There's a spelling error in the comment. "againts" should be "against".
   ```suggestion
             // the regex doesn't support "\" from Windows paths, requiring to 
test against POSIX paths
   ```



##########
packages/stunner-editors/kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-marshalling/src/main/java/org/kie/workbench/common/stunner/bpmn/client/marshall/service/BPMNClientDiagramService.java:
##########
@@ -96,20 +98,23 @@ public BPMNClientDiagramService(final DefinitionManager 
definitionManager,
     @Override
     public void transform(final String xml,
                           final ServiceCallback<Diagram> callback) {
-        doTransform(DEFAULT_DIAGRAM_ID, xml, callback);
+        doTransform(DEFAULT_DIAGRAM_ID, DEFAULT_DIAGRAM_ID, xml, callback);
     }
 
     @Override
     public void transform(final String fileName,
                           final String xml,
                           final ServiceCallback<Diagram> callback) {
-        doTransform(createDiagramTitleFromFilePath(fileName), xml, callback);
+        doTransform(createDiagramTitleFromFilePath(fileName), fileName, xml, 
callback);
     }
 
     private void doTransform(final String fileName,
+                             final String fileRelativePath,
                              final String xml,
                              final ServiceCallback<Diagram> callback) {
-        final Metadata metadata = createMetadata();
+        final Metadata metadata = createMetadata();        
+        metadata.setPath(PathFactory.newPath(fileName, fileRelativePath));
+        LOGGER.log(Level.INFO, "Loading a file: [fileRelativePath: " + 
fileRelativePath + ", fileName: " + fileName + "]");

Review Comment:
   Production code should use appropriate logging levels. Level.INFO is being 
used for debug information about file loading. This log statement should use 
Level.FINE or Level.FINER instead of Level.INFO to prevent cluttering 
production logs with detailed debugging information.
   ```suggestion
           LOGGER.log(Level.FINE, "Loading a file: [fileRelativePath: " + 
fileRelativePath + ", fileName: " + fileName + "]");
   ```



##########
packages/vscode-extension/src/workspace/VsCodeResourceContentServiceForWorkspaces.ts:
##########
@@ -73,48 +74,110 @@ export class VsCodeResourceContentServiceForWorkspaces 
implements ResourceConten
 
       const minimatch = new Minimatch(pattern);
       const regexp = minimatch.makeRe(); // The regexp is ~50x faster than the 
direct match using glob.
+      // e.g. src/main/resources/com/my/module
       const openFileDirectoryNormalizedPosixPathRelativeToTheWorkspaceRoot = 
__path.dirname(
         getNormalizedPosixPathRelativeToWorkspaceRoot(this.args.document)
       );
 
-      const matchingNormalizedPosixPathsRelativeToTheBasePath = 
normalizedPosixPathsRelativeToTheBasePath.filter(
-        (p) => {
-          const matchesPattern =
-            // Adding a leading slash here to make the regex have the same 
behavior as the glob with **/* pattern.
-            regexp.test("/" + p) ||
-            // check on the asset folder for *.{ext} pattern
-            // the regex doesn't support "\" from Windows paths, requiring to 
test againts POSIX paths
-            
regexp.test(__path.posix.relative(openFileDirectoryNormalizedPosixPathRelativeToTheWorkspaceRoot,
 p));
-
-          const conformsToSearchType =
-            !opts ||
-            opts.type === SearchType.TRAVERSAL ||
-            (opts.type === SearchType.ASSET_FOLDER &&
-              __path
-                .join(baseAbsoluteFsPath, toFsPath(p))
-                .startsWith(
-                  __path.join(
-                    baseAbsoluteFsPath,
-                    
toFsPath(openFileDirectoryNormalizedPosixPathRelativeToTheWorkspaceRoot)
-                  )
-                ));
-
-          return matchesPattern && conformsToSearchType;
-        }
-      );
-      return new ResourcesList(pattern, 
matchingNormalizedPosixPathsRelativeToTheBasePath);
+      gitNormalizedPosixPathsRelativeToTheBasePath = 
normalizedPosixPathsRelativeToTheBasePath.filter((p) => {
+        const matchesPattern =
+          // Adding a leading slash here to make the regex have the same 
behavior as the glob with **/* pattern.
+          regexp.test("/" + p) ||
+          // check on the asset folder for *.{ext} pattern
+          // the regex doesn't support "\" from Windows paths, requiring to 
test againts POSIX paths
+          // relative to `this.args.document`, e.g. 
../../../src/main/java/com/my/module/MyClass.java
+          
regexp.test(__path.posix.relative(openFileDirectoryNormalizedPosixPathRelativeToTheWorkspaceRoot,
 p));
+
+        const conformsToSearchType =
+          !opts ||
+          opts.type === SearchType.TRAVERSAL ||
+          (opts.type === SearchType.ASSET_FOLDER &&
+            __path
+              .join(baseAbsoluteFsPath, toFsPath(p))
+              .startsWith(
+                __path.join(
+                  baseAbsoluteFsPath,
+                  
toFsPath(openFileDirectoryNormalizedPosixPathRelativeToTheWorkspaceRoot)
+                )
+              ));
+
+        return matchesPattern && conformsToSearchType;
+      });
     } catch (error) {
       console.debug(
-        "VS CODE RESOURCE CONTENT API IMPL FOR WORKSPACES: Failed to use 
isomorphic-git to read dir. Falling back to vscode's API.",
+        "VS CODE RESOURCE CONTENT API IMPL FOR WORKSPACES: Failed to use 
isomorphic-git to read dir. Falling back to VS Code API.",
         error
       );
-      const relativePattern = new RelativePattern(baseAbsoluteFsPath, pattern);
-      const files = await vscode.workspace.findFiles(relativePattern);
-      const normalizedPosixPathsRelativeToTheWorkspaceRoot = files.map((uri) =>
-        vscode.workspace.asRelativePath(uri, false)
-      );
-      return new ResourcesList(pattern, 
normalizedPosixPathsRelativeToTheWorkspaceRoot);
     }
+
+    // Normalize incoming pattern to POSIX for VS Code globbing
+    const posixPattern = pattern.replace(/\\/g, "/");
+    const { staticPrefix, remainingGlob } = 
this.splitStaticPrefix(posixPattern);
+
+    let theMostSpecificFolder = baseAbsoluteFsPath;
+    const globRelativeToBase = remainingGlob ?? posixPattern;

Review Comment:
   The logic on line 118 uses nullish coalescing (??) to fall back to 
posixPattern when remainingGlob is empty string. However, splitStaticPrefix 
returns an empty string for remainingGlob when all segments are static (line 
178), not null or undefined. An empty string is falsy but not nullish, so the 
?? operator won't trigger the fallback. This could cause issues when the entire 
pattern is static with no glob magic. Consider using || instead of ?? or 
explicitly checking for empty string.
   ```suggestion
       const globRelativeToBase = remainingGlob || posixPattern;
   ```



##########
packages/stunner-editors/kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-kogito-runtime/src/main/java/org/kie/workbench/common/stunner/kogito/client/services/WorkItemDefinitionStandaloneClientService.java:
##########
@@ -93,24 +94,34 @@ public WorkItemDefinitionRegistry getRegistry() {
 
     @Override
     public Promise<Collection<WorkItemDefinition>> call(final Metadata input) {
-        return loader;
+        return allWorkItemsLoader(input.getPath());

Review Comment:
   The method call input.getPath() at line 97 could potentially return null, 
which would cause a NullPointerException when passed to allWorkItemsLoader. 
While the code handles null openedDiagramPath inside allWorkItemsLoader, it 
would be clearer and safer to add null check documentation or handle it more 
explicitly at the call site.
   ```suggestion
           Path path = input.getPath();
           if (path == null) {
               // Explicitly handle null path: return empty collection
               return promises.resolve(Collections.emptyList());
           }
           return allWorkItemsLoader(path);
   ```



##########
packages/vscode-extension/src/workspace/VsCodeResourceContentServiceForWorkspaces.ts:
##########
@@ -73,48 +74,110 @@ export class VsCodeResourceContentServiceForWorkspaces 
implements ResourceConten
 
       const minimatch = new Minimatch(pattern);
       const regexp = minimatch.makeRe(); // The regexp is ~50x faster than the 
direct match using glob.
+      // e.g. src/main/resources/com/my/module
       const openFileDirectoryNormalizedPosixPathRelativeToTheWorkspaceRoot = 
__path.dirname(
         getNormalizedPosixPathRelativeToWorkspaceRoot(this.args.document)
       );
 
-      const matchingNormalizedPosixPathsRelativeToTheBasePath = 
normalizedPosixPathsRelativeToTheBasePath.filter(
-        (p) => {
-          const matchesPattern =
-            // Adding a leading slash here to make the regex have the same 
behavior as the glob with **/* pattern.
-            regexp.test("/" + p) ||
-            // check on the asset folder for *.{ext} pattern
-            // the regex doesn't support "\" from Windows paths, requiring to 
test againts POSIX paths
-            
regexp.test(__path.posix.relative(openFileDirectoryNormalizedPosixPathRelativeToTheWorkspaceRoot,
 p));
-
-          const conformsToSearchType =
-            !opts ||
-            opts.type === SearchType.TRAVERSAL ||
-            (opts.type === SearchType.ASSET_FOLDER &&
-              __path
-                .join(baseAbsoluteFsPath, toFsPath(p))
-                .startsWith(
-                  __path.join(
-                    baseAbsoluteFsPath,
-                    
toFsPath(openFileDirectoryNormalizedPosixPathRelativeToTheWorkspaceRoot)
-                  )
-                ));
-
-          return matchesPattern && conformsToSearchType;
-        }
-      );
-      return new ResourcesList(pattern, 
matchingNormalizedPosixPathsRelativeToTheBasePath);
+      gitNormalizedPosixPathsRelativeToTheBasePath = 
normalizedPosixPathsRelativeToTheBasePath.filter((p) => {
+        const matchesPattern =
+          // Adding a leading slash here to make the regex have the same 
behavior as the glob with **/* pattern.
+          regexp.test("/" + p) ||
+          // check on the asset folder for *.{ext} pattern
+          // the regex doesn't support "\" from Windows paths, requiring to 
test againts POSIX paths
+          // relative to `this.args.document`, e.g. 
../../../src/main/java/com/my/module/MyClass.java
+          
regexp.test(__path.posix.relative(openFileDirectoryNormalizedPosixPathRelativeToTheWorkspaceRoot,
 p));
+
+        const conformsToSearchType =
+          !opts ||
+          opts.type === SearchType.TRAVERSAL ||
+          (opts.type === SearchType.ASSET_FOLDER &&
+            __path
+              .join(baseAbsoluteFsPath, toFsPath(p))
+              .startsWith(
+                __path.join(
+                  baseAbsoluteFsPath,
+                  
toFsPath(openFileDirectoryNormalizedPosixPathRelativeToTheWorkspaceRoot)
+                )
+              ));
+
+        return matchesPattern && conformsToSearchType;
+      });
     } catch (error) {
       console.debug(
-        "VS CODE RESOURCE CONTENT API IMPL FOR WORKSPACES: Failed to use 
isomorphic-git to read dir. Falling back to vscode's API.",
+        "VS CODE RESOURCE CONTENT API IMPL FOR WORKSPACES: Failed to use 
isomorphic-git to read dir. Falling back to VS Code API.",
         error
       );
-      const relativePattern = new RelativePattern(baseAbsoluteFsPath, pattern);
-      const files = await vscode.workspace.findFiles(relativePattern);
-      const normalizedPosixPathsRelativeToTheWorkspaceRoot = files.map((uri) =>
-        vscode.workspace.asRelativePath(uri, false)
-      );
-      return new ResourcesList(pattern, 
normalizedPosixPathsRelativeToTheWorkspaceRoot);
     }
+
+    // Normalize incoming pattern to POSIX for VS Code globbing
+    const posixPattern = pattern.replace(/\\/g, "/");
+    const { staticPrefix, remainingGlob } = 
this.splitStaticPrefix(posixPattern);
+
+    let theMostSpecificFolder = baseAbsoluteFsPath;
+    const globRelativeToBase = remainingGlob ?? posixPattern;
+
+    // In case of ASSET_FOLDER we are done, see baseAbsoluteFsPath creation
+    if (opts?.type !== SearchType.ASSET_FOLDER) {
+      theMostSpecificFolder = staticPrefix ? __path.join(baseAbsoluteFsPath, 
staticPrefix) : baseAbsoluteFsPath;
+    }
+
+    const relativePattern = new RelativePattern(theMostSpecificFolder, 
globRelativeToBase);
+
+    const vscodeFoundFiles = await vscode.workspace.findFiles(relativePattern);
+    const vscodeNormalizedPosixPathsRelativeToTheBasePath = 
vscodeFoundFiles.map((uri) =>
+      vscode.workspace.asRelativePath(uri, false).replace(/\\/g, "/")
+    );
+
+    console.debug(
+      "VS CODE RESOURCE CONTENT API IMPL FOR WORKSPACES: Git found files [%s]",
+      gitNormalizedPosixPathsRelativeToTheBasePath
+    );
+    console.debug(
+      "VS CODE RESOURCE CONTENT API IMPL FOR WORKSPACES: VS Code found files 
[%s]",
+      vscodeNormalizedPosixPathsRelativeToTheBasePath
+    );
+
+    return new ResourcesList(
+      pattern,
+      Array.from(
+        new Set([...gitNormalizedPosixPathsRelativeToTheBasePath, 
...vscodeNormalizedPosixPathsRelativeToTheBasePath])
+      )
+    );
+  }
+
+  // Detects glob "magic" beyond just "*" and "**"
+  private hasGlobMagic(seg: string): boolean {
+    // *, ?, [], {}, !, and simple extglobs like +(…), *(…), ?(…), !(…)
+    return /[*?[\]{},!]/.test(seg) || /\([^)]+\)/.test(seg);

Review Comment:
   The regex pattern in hasGlobMagic has an unescaped closing bracket "]" which 
could cause unexpected behavior. The character class [*?[\]{},!] contains an 
unescaped "[" which should be escaped as "\[". The correct pattern should be 
/[*?[\]{},'!]/ or /[*?\[\]{},'!]/ to properly match literal brackets.
   ```suggestion
       return /[*?\[\]{},!]/.test(seg) || /\([^)]+\)/.test(seg);
   ```



##########
packages/vscode-extension/src/workspace/VsCodeResourceContentServiceForWorkspaces.ts:
##########
@@ -73,48 +74,110 @@ export class VsCodeResourceContentServiceForWorkspaces 
implements ResourceConten
 
       const minimatch = new Minimatch(pattern);
       const regexp = minimatch.makeRe(); // The regexp is ~50x faster than the 
direct match using glob.
+      // e.g. src/main/resources/com/my/module
       const openFileDirectoryNormalizedPosixPathRelativeToTheWorkspaceRoot = 
__path.dirname(
         getNormalizedPosixPathRelativeToWorkspaceRoot(this.args.document)
       );
 
-      const matchingNormalizedPosixPathsRelativeToTheBasePath = 
normalizedPosixPathsRelativeToTheBasePath.filter(
-        (p) => {
-          const matchesPattern =
-            // Adding a leading slash here to make the regex have the same 
behavior as the glob with **/* pattern.
-            regexp.test("/" + p) ||
-            // check on the asset folder for *.{ext} pattern
-            // the regex doesn't support "\" from Windows paths, requiring to 
test againts POSIX paths
-            
regexp.test(__path.posix.relative(openFileDirectoryNormalizedPosixPathRelativeToTheWorkspaceRoot,
 p));
-
-          const conformsToSearchType =
-            !opts ||
-            opts.type === SearchType.TRAVERSAL ||
-            (opts.type === SearchType.ASSET_FOLDER &&
-              __path
-                .join(baseAbsoluteFsPath, toFsPath(p))
-                .startsWith(
-                  __path.join(
-                    baseAbsoluteFsPath,
-                    
toFsPath(openFileDirectoryNormalizedPosixPathRelativeToTheWorkspaceRoot)
-                  )
-                ));
-
-          return matchesPattern && conformsToSearchType;
-        }
-      );
-      return new ResourcesList(pattern, 
matchingNormalizedPosixPathsRelativeToTheBasePath);
+      gitNormalizedPosixPathsRelativeToTheBasePath = 
normalizedPosixPathsRelativeToTheBasePath.filter((p) => {
+        const matchesPattern =
+          // Adding a leading slash here to make the regex have the same 
behavior as the glob with **/* pattern.
+          regexp.test("/" + p) ||
+          // check on the asset folder for *.{ext} pattern
+          // the regex doesn't support "\" from Windows paths, requiring to 
test againts POSIX paths
+          // relative to `this.args.document`, e.g. 
../../../src/main/java/com/my/module/MyClass.java
+          
regexp.test(__path.posix.relative(openFileDirectoryNormalizedPosixPathRelativeToTheWorkspaceRoot,
 p));
+
+        const conformsToSearchType =
+          !opts ||
+          opts.type === SearchType.TRAVERSAL ||
+          (opts.type === SearchType.ASSET_FOLDER &&
+            __path
+              .join(baseAbsoluteFsPath, toFsPath(p))
+              .startsWith(
+                __path.join(
+                  baseAbsoluteFsPath,
+                  
toFsPath(openFileDirectoryNormalizedPosixPathRelativeToTheWorkspaceRoot)
+                )
+              ));
+
+        return matchesPattern && conformsToSearchType;
+      });
     } catch (error) {
       console.debug(
-        "VS CODE RESOURCE CONTENT API IMPL FOR WORKSPACES: Failed to use 
isomorphic-git to read dir. Falling back to vscode's API.",
+        "VS CODE RESOURCE CONTENT API IMPL FOR WORKSPACES: Failed to use 
isomorphic-git to read dir. Falling back to VS Code API.",
         error
       );
-      const relativePattern = new RelativePattern(baseAbsoluteFsPath, pattern);
-      const files = await vscode.workspace.findFiles(relativePattern);
-      const normalizedPosixPathsRelativeToTheWorkspaceRoot = files.map((uri) =>
-        vscode.workspace.asRelativePath(uri, false)
-      );
-      return new ResourcesList(pattern, 
normalizedPosixPathsRelativeToTheWorkspaceRoot);
     }
+
+    // Normalize incoming pattern to POSIX for VS Code globbing
+    const posixPattern = pattern.replace(/\\/g, "/");
+    const { staticPrefix, remainingGlob } = 
this.splitStaticPrefix(posixPattern);
+
+    let theMostSpecificFolder = baseAbsoluteFsPath;
+    const globRelativeToBase = remainingGlob ?? posixPattern;
+
+    // In case of ASSET_FOLDER we are done, see baseAbsoluteFsPath creation
+    if (opts?.type !== SearchType.ASSET_FOLDER) {
+      theMostSpecificFolder = staticPrefix ? __path.join(baseAbsoluteFsPath, 
staticPrefix) : baseAbsoluteFsPath;
+    }
+
+    const relativePattern = new RelativePattern(theMostSpecificFolder, 
globRelativeToBase);
+
+    const vscodeFoundFiles = await vscode.workspace.findFiles(relativePattern);
+    const vscodeNormalizedPosixPathsRelativeToTheBasePath = 
vscodeFoundFiles.map((uri) =>
+      vscode.workspace.asRelativePath(uri, false).replace(/\\/g, "/")
+    );
+
+    console.debug(
+      "VS CODE RESOURCE CONTENT API IMPL FOR WORKSPACES: Git found files [%s]",
+      gitNormalizedPosixPathsRelativeToTheBasePath
+    );
+    console.debug(
+      "VS CODE RESOURCE CONTENT API IMPL FOR WORKSPACES: VS Code found files 
[%s]",
+      vscodeNormalizedPosixPathsRelativeToTheBasePath
+    );
+
+    return new ResourcesList(
+      pattern,
+      Array.from(
+        new Set([...gitNormalizedPosixPathsRelativeToTheBasePath, 
...vscodeNormalizedPosixPathsRelativeToTheBasePath])
+      )
+    );
+  }
+
+  // Detects glob "magic" beyond just "*" and "**"
+  private hasGlobMagic(seg: string): boolean {
+    // *, ?, [], {}, !, and simple extglobs like +(…), *(…), ?(…), !(…)
+    return /[*?[\]{},!]/.test(seg) || /\([^)]+\)/.test(seg);
+  }
+
+  // Splits "a/b/c" to array ["a", "b", "c"]

Review Comment:
   The newly added private helper methods hasGlobMagic and splitPosixSegments 
lack documentation comments. Adding brief JSDoc comments would improve code 
maintainability by explaining their purpose and behavior.
   ```suggestion
     /**
      * Detects if a path segment contains glob "magic" characters (e.g., *, ?, 
[], {}, !, or extglobs like +(…), *(…), ?(…), !(…)).
      * @param seg - The path segment to check.
      * @returns True if the segment contains glob magic, false otherwise.
      */
     private hasGlobMagic(seg: string): boolean {
       // *, ?, [], {}, !, and simple extglobs like +(…), *(…), ?(…), !(…)
       return /[*?[\]{},!]/.test(seg) || /\([^)]+\)/.test(seg);
     }
   
     /**
      * Splits a POSIX-style path (e.g., "a/b/c") into its non-empty segments.
      * @param path - The POSIX path string to split.
      * @returns An array of non-empty path segments.
      */
   ```



##########
packages/stunner-editors/kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-marshalling/src/main/java/org/kie/workbench/common/stunner/bpmn/client/marshall/service/BPMNClientDiagramService.java:
##########
@@ -96,20 +98,23 @@ public BPMNClientDiagramService(final DefinitionManager 
definitionManager,
     @Override
     public void transform(final String xml,
                           final ServiceCallback<Diagram> callback) {
-        doTransform(DEFAULT_DIAGRAM_ID, xml, callback);
+        doTransform(DEFAULT_DIAGRAM_ID, DEFAULT_DIAGRAM_ID, xml, callback);
     }
 
     @Override
     public void transform(final String fileName,
                           final String xml,
                           final ServiceCallback<Diagram> callback) {
-        doTransform(createDiagramTitleFromFilePath(fileName), xml, callback);
+        doTransform(createDiagramTitleFromFilePath(fileName), fileName, xml, 
callback);
     }
 
     private void doTransform(final String fileName,
+                             final String fileRelativePath,
                              final String xml,
                              final ServiceCallback<Diagram> callback) {
-        final Metadata metadata = createMetadata();
+        final Metadata metadata = createMetadata();        

Review Comment:
   The logging statement at line 117 contains trailing whitespace at the end of 
the line after the createMetadata() call. This should be removed to maintain 
code cleanliness.
   ```suggestion
           final Metadata metadata = createMetadata();
   ```



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