-
Notifications
You must be signed in to change notification settings - Fork 471
Create Maven nested project Test Case - Reproduce the Issue ".java is not on the classpath of project" #3460
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
Open
AnqiHuangQiQi
wants to merge
20
commits into
eclipse-jdtls:main
Choose a base branch
from
AnqiHuangQiQi:patch-1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
79ed27d
Create nested project
AnqiHuangQiQi 3681a21
Add more files
AnqiHuangQiQi 9fdfe21
Create .classpath
AnqiHuangQiQi d5c64a4
Add files via upload
AnqiHuangQiQi d13a3ca
Create .project
AnqiHuangQiQi 8671056
Update and rename pom.xml to .project
AnqiHuangQiQi f24ab5f
Create .classpath
AnqiHuangQiQi 513194d
Delete mypackage_mytarget/pom.xml
AnqiHuangQiQi 5ca6eef
Fix
AnqiHuangQiQi 2eedeae
Update JDTUtils.java
AnqiHuangQiQi 1fa97f1
update linkedResource path
AnqiHuangQiQi 4bbf792
Update JDTUtils indent
AnqiHuangQiQi 16f011f
Update .project
AnqiHuangQiQi f1dd774
Merge branch 'eclipse-jdtls:main' into patch-1
AnqiHuangQiQi aeb389f
fix JdtUtils FindResource
AnqiHuangQiQi 5b02a1e
verify if compilation unit path match with packagefragmentroot path
AnqiHuangQiQi c249465
remove unnecessary conflict
AnqiHuangQiQi 69e790d
fix the merge conflicts which removed the original code
AnqiHuangQiQi e120794
address comments
AnqiHuangQiQi e15c9f6
Merge branch 'eclipse-jdtls:main' into patch-1
AnqiHuangQiQi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
org.eclipse.jdt.ls.tests/projects/maven/nested-project/.classpath
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <classpath> | ||
| <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/> | ||
| <classpathentry kind="output" path="eclipse-bin"/> | ||
| </classpath> |
6 changes: 6 additions & 0 deletions
6
...dt.ls.tests/projects/maven/nested-project/.eclipse/projects/mypackage_mytarget/.classpath
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <classpath> | ||
| <classpathentry kind="src" path="linked-srcs" /> | ||
| <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/> | ||
| <classpathentry kind="output" path="eclipse-bin"/> | ||
| </classpath> |
41 changes: 41 additions & 0 deletions
41
....jdt.ls.tests/projects/maven/nested-project/.eclipse/projects/mypackage_mytarget/.project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <projectDescription> | ||
| <name>mypackage_mytarget</name> | ||
| <comment></comment> | ||
| <projects> | ||
| </projects> | ||
| <buildSpec> | ||
| <buildCommand> | ||
| <name>org.eclipse.jdt.core.javabuilder</name> | ||
| <arguments> | ||
| </arguments> | ||
| </buildCommand> | ||
| <buildCommand> | ||
| <name>org.eclipse.m2e.core.maven2Builder</name> | ||
| <arguments> | ||
| </arguments> | ||
| </buildCommand> | ||
| </buildSpec> | ||
| <natures> | ||
| <nature>org.eclipse.m2e.core.maven2Nature</nature> | ||
| <nature>org.eclipse.jdt.core.javanature</nature> | ||
| </natures> | ||
| <linkedResources> | ||
| <link> | ||
| <name>linked-srcs/com/packages/foo/File.java</name> | ||
| <type>1</type> | ||
| <location>PARENT-3-PROJECT_LOC/com/packages/foo/File.java</location> | ||
| </link> | ||
| </linkedResources> | ||
| <filteredResources> | ||
| <filter> | ||
| <id>1748456351890</id> | ||
| <name></name> | ||
| <type>30</type> | ||
| <matcher> | ||
| <id>org.eclipse.core.resources.regexFilterMatcher</id> | ||
| <arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments> | ||
| </matcher> | ||
| </filter> | ||
| </filteredResources> | ||
| </projectDescription> |
Binary file added
BIN
+550 Bytes
...sted-project/.eclipse/projects/mypackage_mytarget/eclipse-bin/com/packages/foo/File.class
Binary file not shown.
34 changes: 34 additions & 0 deletions
34
org.eclipse.jdt.ls.tests/projects/maven/nested-project/.project
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <projectDescription> | ||
| <name>workspace_root</name> | ||
| <comment></comment> | ||
| <projects> | ||
| </projects> | ||
| <buildSpec> | ||
| <buildCommand> | ||
| <name>org.eclipse.jdt.core.javabuilder</name> | ||
| <arguments> | ||
| </arguments> | ||
| </buildCommand> | ||
| <buildCommand> | ||
| <name>org.eclipse.m2e.core.maven2Builder</name> | ||
| <arguments> | ||
| </arguments> | ||
| </buildCommand> | ||
| </buildSpec> | ||
| <natures> | ||
| <nature>org.eclipse.m2e.core.maven2Nature</nature> | ||
| <nature>org.eclipse.jdt.core.javanature</nature> | ||
| </natures> | ||
| <filteredResources> | ||
| <filter> | ||
| <id>1748456351890</id> | ||
| <name></name> | ||
| <type>30</type> | ||
| <matcher> | ||
| <id>org.eclipse.core.resources.regexFilterMatcher</id> | ||
| <arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments> | ||
| </matcher> | ||
| </filter> | ||
| </filteredResources> | ||
| </projectDescription> |
9 changes: 9 additions & 0 deletions
9
org.eclipse.jdt.ls.tests/projects/maven/nested-project/com/packages/foo/File.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| package com.packages.foo; | ||
|
|
||
| public class File | ||
| { | ||
| public static void main(String[] args) | ||
| { | ||
| System.out.println("Hello, World"); | ||
| } | ||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
That's odd. Don't use
getClass().equals(..). UseisInstance. Don't use internal classes (eg.,PackageFragmentRoot). Use official JDT API only. Also, this check is unnecessary. The array is alreadyIPackageFragmentRoot