Skip to content

Conversation

@andxu
Copy link
Contributor

@andxu andxu commented Nov 16, 2018

… should not return an empty path

Signed-off-by: andxu [email protected]

… should not return an empty path

Signed-off-by: andxu <[email protected]>
@andxu
Copy link
Contributor Author

andxu commented Nov 16, 2018

#79

PackageNode packageNode = new PackageNode(packageName, packageFragment.getPath().toPortableString(), NodeKind.PACKAGE);
IPackageFragmentRoot pkgRoot = (IPackageFragmentRoot) packageFragment.getParent();
PackageNode rootNode = null;
if (typeRoot instanceof IClassFile) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typeRoot is already null...

pkgRoot.getPath().toPortableString(), NodeKind.PACKAGEROOT, pkgRoot.getKind());
}

IProject proj = parentJavaElement.getJavaProject().getProject();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part should be duplicate code

return result;
}


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Misleading method name. Should be ancestor list


private static List<PackageNode> getParentListToProject(IResource element) throws JavaModelException {
List<PackageNode> nodeList = new ArrayList<>();
while (element != null) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part have lots of duplicate code with other parts in this file

@andxu
Copy link
Contributor Author

andxu commented Dec 21, 2018

using #131 to replace this one

@jdneo jdneo deleted the andy_sync_resource branch March 16, 2020 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants