Skip to content
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

Intellisense does not work when attached javadoc can't be read #1314

Merged
merged 1 commit into from
Dec 31, 2019

Conversation

snjeza
Copy link
Contributor

@snjeza snjeza commented Dec 25, 2019

Fixes redhat-developer/vscode-java#1217

Signed-off-by: Snjezana Peco snjezana.peco@redhat.com

Copy link
Contributor

@fbricon fbricon left a comment

Choose a reason for hiding this comment

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

Can you please add some unit tests?

@snjeza
Copy link
Contributor Author

snjeza commented Dec 27, 2019

@fbricon I have updated the PR.

@@ -0,0 +1,176 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Copy link
Contributor

Choose a reason for hiding this comment

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

the build, reporting and profiles sections are not necessary

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@@ -2563,6 +2565,28 @@ public void testCompletion_FilterTypesKeepMethods() throws JavaModelException {
}
}

@Test
public void testCompletion_InvalidJavadoc() throws Exception {
importProjects("maven/aspose");
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we make the project folder name to be consistent with the artifact id aspose-word-test in the pom.xml?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

IProject project = null;
ICompilationUnit unit = null;
try {
project = ResourcesPlugin.getWorkspace().getRoot().getProject("aspose-word-test");
Copy link
Contributor

Choose a reason for hiding this comment

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

-> WorkspaceHelper.getProject("aspose-word-test")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

return element.getAttachedJavadoc(null);
String attachedJavadoc;
try {
attachedJavadoc = element.getAttachedJavadoc(null);
Copy link
Contributor

Choose a reason for hiding this comment

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

return element.getAttachedJavadoc(null);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Signed-off-by: Snjezana Peco <snjezana.peco@redhat.com>
@fbricon fbricon merged commit 8f98e0a into eclipse-jdtls:master Dec 31, 2019
@fbricon fbricon changed the title Intellisense not work on close source jar Intellisense does not work when attached javadoc can't be read Feb 4, 2020
@fbricon fbricon added this to the End January 2020 milestone Feb 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Intellisense not work on close source jar
3 participants