Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
Signed-off-by: Sheng Chen <[email protected]>
  • Loading branch information
jdneo committed Aug 5, 2022
1 parent 8644939 commit 3720f3d
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,7 @@ public static boolean loadInvisibleProject(IPath javaFile, IPath rootPath, boole
* Based on the trigger file and its belonging source folder, search more places and collect
* the valid source paths.
* @param triggerFilePath the path of the import trigger file.
* @param triggerFolder the folder which contains the trigger file. A search will be executed
* based on the trigger folder.
* @param triggerFolder the folder which is the source root of the trigger file.
* @param linkedFolder the invisible project's linked folder.
*/
private static Collection<IPath> collectSourcePaths(IPath triggerFilePath, IFolder triggerFolder,
Expand Down Expand Up @@ -215,8 +214,7 @@ private static Collection<IPath> collectSourcePaths(IPath triggerFilePath, IFold
/**
* Collect folders that may contain Java source files.
* @param triggerFilePath the path of the import trigger file.
* @param triggerFolder the folder which contains the trigger file. A search will be executed
* based on the trigger folder.
* @param triggerFolder the folder which is the source root of the trigger file.
* @param linkedFolderPath the path of invisible project's linked folder.
*/
private static Collection<File> collectFoldersToSearch(IPath triggerFilePath, IFolder triggerFolder,
Expand Down Expand Up @@ -248,9 +246,9 @@ private static Collection<File> getDirectChildFolders(IPath triggerFilePath, IFo
continue;
}

Path eclipsePath = new Path(dir.getAbsolutePath());
Path dirPath = new Path(dir.getAbsolutePath());
// skip ancestor folder of the trigger file.
if (eclipsePath.isPrefixOf(triggerFilePath)) {
if (dirPath.isPrefixOf(triggerFilePath)) {
continue;
}

Expand All @@ -261,7 +259,7 @@ private static Collection<File> getDirectChildFolders(IPath triggerFilePath, IFo

/**
* Get the sibling folders of the trigger folder.
* @param triggerFolder the trigger folder
* @param triggerFolder the folder which is the source root of the trigger file.
* @param linkedFolderPath the path of invisible project's linked folder.
*/
private static Collection<File> getSiblingFolders(IFolder triggerFolder, IPath linkedFolderPath) {
Expand Down

0 comments on commit 3720f3d

Please sign in to comment.