Skip to content

Commit

Permalink
fix for multi-project workspaces
Browse files Browse the repository at this point in the history
Signed-off-by: Pranav Gaikwad <[email protected]>
  • Loading branch information
pranavgaikwad committed May 15, 2024
1 parent 189fe8a commit 31708cd
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,11 @@ private static List<SymbolInformation> search(String projectName, ArrayList<Stri
fragmentPath = fragmentPath.removeFirstSegments(1);
for (String includedPath : includedPaths) {
IPath includedIPath = Path.fromOSString(includedPath);
// when there are more than one sub-projects, the paths are of form
// <project-name>/src/main/java/
if (includedPath.startsWith(proj.getElementName())) {
includedIPath = includedIPath.removeFirstSegments(1);
}
// instead of comparing path strings, comparing segments is better for 2 reasons:
// - we don't have to worry about redundant . / etc in input
// - matching sub-trees is easier with segments than strings
Expand Down

0 comments on commit 31708cd

Please sign in to comment.