Skip to content

feat: Display non-java resources in the Project explorer #730

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

Merged
merged 2 commits into from
Apr 10, 2023
Merged

Conversation

jdneo
Copy link
Member

@jdneo jdneo commented Apr 4, 2023

Fix #145

The new explorer will looks like this:
image

@jdneo jdneo added the enhancement New feature or request label Apr 4, 2023
@jdneo jdneo added this to the 0.22.0 milestone Apr 4, 2023
@jdneo jdneo force-pushed the cs/issue-145 branch 4 times, most recently from dcd38cf to c5ebc06 Compare April 7, 2023 07:15
@jdneo
Copy link
Member Author

jdneo commented Apr 7, 2023

Performance impact

Test case

After project petclinic imported, Open the file PetClinicIntegrationTests.java to let Explorer fetch the nodes and sync the position.

Without this PR:

request total time
java.resolvePath 566
java.getPackageData 69

With this PR:

request total time
java.resolvePath 354
java.getPackageData 85

The time cost of java.resolvePath, it's usually ranging from 300~600ms

@jdneo jdneo marked this pull request as ready for review April 7, 2023 07:48
@CsCherrYY
Copy link
Contributor

Here is a case about non-Java project, given Gradle sample project (https://docs.gradle.org/current/samples/sample_building_java_applications.html), the current Java projects view shows only project app since it's a java project, and ignore the root project demo since it's a non-java project.

Since we have supported displaying non-java resources, we can also consider showing the non-java project in the project explorer. Given eclipse package explorer:
image

@jdneo
Copy link
Member Author

jdneo commented Apr 10, 2023

Here is a case about non-Java project, given Gradle sample project

Filed an issue to track: #736

Copy link
Contributor

@CsCherrYY CsCherrYY left a comment

Choose a reason for hiding this comment

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

LGTM overall. One small thing: can we adjust the order of source sets? Showing main/test source sets before the generated source sets would be better.

after:
image

before:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Display non-Java files in Java Projects explorer
2 participants