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

How to disable automatic update of ".project" files and ".settings" folders at project opening #2741

Open
vincenzocaselli opened this issue Oct 14, 2022 · 7 comments

Comments

@vincenzocaselli
Copy link

I have a folder/workspace/project (originally created with Eclipse and maintained with Git) containing a large number of sub-projects.

Now I am trying to switch to VsCode, but every time I open this workspace every .project file and every .settings folder are automatically updated.

Since they are under git maintenance these automatic updates are quite frustrating.
Is there some setting for disabling this behavior?
I already tried many settings, among with:

"java.import.generatesMetadataFilesAtProjectRoot": false,
"java.project.resourceFilters": [
        "\\.settings"
]

but without success.
Any hints?
Thank you very much

Environment
  • Operating System: Windows 10
  • JDK version: JDK 1.7
  • Visual Studio Code version: 1.72.1
@jdneo
Copy link
Collaborator

jdneo commented Oct 24, 2022

AFAIK, there is no switch for that so far. 😥

@DiegoBallve
Copy link

I'd like to have this option too. Anything new on it?

@snjeza
Copy link
Contributor

snjeza commented Oct 12, 2023

You can try

"java.import.exclusions": [
        "**/node_modules/**",
        "**/.metadata/**",
        "**/archetype-resources/**",
        "**/META-INF/maven/**",
        "**/<your_project_folder1>/**"
	"**/<your_project_folder2>/**"
...
    ],

@DiegoBallve
Copy link

DiegoBallve commented Oct 18, 2023

You can try

"java.import.exclusions": [
        "**/node_modules/**",
        "**/.metadata/**",
        "**/archetype-resources/**",
        "**/META-INF/maven/**",
        "**/<your_project_folder1>/**"
	"**/<your_project_folder2>/**"
...
    ],

Thanks @snjeza but it did not do what I wanted. Files are still being detected and modified by the extension in the loading in process. You can easily try it with by importing into workspace a project with .project with unpretty xml.. extension will automatically tidy it up for you.. since these files are maintained / used by another IDE, I'd rather have Code not touching them.

BTW this flag looks interesting: java.import.generatesMetadataFilesAtProjectRoot (docs)
Too bad it's just a boolean flag that uses the files if they are present.
I wish there was a java.import.ignoresMetadataFilesAtProjectRoot

@liufuyang
Copy link

liufuyang commented Jan 31, 2024

And update on this issue? It seems still exist? I have test small repo here and when I open it the eclipse project files get modified and I would like to avoid that, since the project also is controlled by a gradle build. (But I would like to preserve the eclipse build file a we have people do not use gradle and still use eclipse and those eclipse project files are checked in.)
https://github.com/liufuyang/eclipse-gradle-mix-demo

@se725
Copy link

se725 commented Mar 13, 2024

Every. Single. Time.

image

@v1lling
Copy link

v1lling commented Jan 23, 2025

I highly support this. I would also love to see a setting to turn this off.

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

7 participants