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

Extension modifies .project even if java.configuration.updateBuildConfiguration is set to disabled #3937

Closed
svogt opened this issue Jan 29, 2025 · 3 comments

Comments

@svogt
Copy link

svogt commented Jan 29, 2025

I've set java.configuration.updateBuildConfiguration to disabled both on Workspace and user settings level and yet as soon as I start VSCode my .project files get modified and this snippet is being added

<filteredResources>
   <filter>
      <id>1738140691880</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>

Can this be avoided?

Background: We as a company commit .project / .classpath to Git and the majority still uses Eclipse. Quite annoying to have 30+ modified files every time I try to use VSCode on a project

@rgrunber
Copy link
Member

rgrunber commented Feb 5, 2025

java.configuration.updateBuildConfiguration controls whether (or how) the project classpath is updated when build files are modified, so it would control this behaviour.

Based on a quick look at the codebase, you should be able to bypass this by setting "java.project.resourceFilters": []. By default it is [ "node_modules", "\\.git" ] so that those locations are not refreshed by the language server. Let me know if this fixes it.

@svogt
Copy link
Author

svogt commented Feb 7, 2025

Hi Roland,

thanks for the tip! Yes, indeed that worked. Thank you very much

@rgrunber
Copy link
Member

rgrunber commented Feb 8, 2025

Closing for now. Might be good to investigate whether we can somehow enable our filters without overwriting the existing ones a project may already have.

@rgrunber rgrunber closed this as completed Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants