-
Notifications
You must be signed in to change notification settings - Fork 91
Fix the sync issue with non-java files, resolvePath for non-java file… #105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… should not return an empty path Signed-off-by: andxu <[email protected]>
| PackageNode packageNode = new PackageNode(packageName, packageFragment.getPath().toPortableString(), NodeKind.PACKAGE); | ||
| IPackageFragmentRoot pkgRoot = (IPackageFragmentRoot) packageFragment.getParent(); | ||
| PackageNode rootNode = null; | ||
| if (typeRoot instanceof IClassFile) { |
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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; | ||
| } | ||
|
|
||
|
|
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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
|
using #131 to replace this one |
… should not return an empty path
Signed-off-by: andxu [email protected]