redhat-developer / redhat-developer/vscode-java

Exclude default folders from file watching

Open
#3,703 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
11

Description

In my scenario I'm working with Gradle projects, but the context should also apply to Maven and normal project.

After opening project it would be nice if .gradle/** and build/** were automatically excluded from fileWatch by this extension, for Maven I believe it's target/**. Whether to exclude bin/** is up to you, but for me it makes no sense to watch it too, since IDE should be aware of its own folders?
Obviously these folders are configurable so mby this should be also some kind of config based on type of project import?

The point of this is to prevent unnecessary autoBuild triggers and similar, which may even result in permanent refresh loop like this

Environment
  • note: env should be irrelevant for this issue
  • Operating System: Win 11 pro, latest update
  • JDK version: 21
  • Visual Studio Code version:
  • Java extension version:
Steps To Reproduce
  1. Open Gradle project
  2. Notify any file in eg. build
  3. See extension being notified of file change
Current Result

Entire project being file watched, causing unnecessary eclipse-jdtls trigger

Expected Result

Don't watch files that aren't "source" relevant

Additional Informations

May provide my .vscode/settings.json if needed

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the file-watching behavior with a Gradle project and a change under build/; compare it with the expected behavior for .gradle/ and Maven target/**. Trace the extension's file-watch configuration and determine how project-import type or user configuration should provide the exclusions. Done means generated folders no longer trigger unnecessary extension notifications or auto-build activity, while source changes remain watched.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, typescript
Domain
devtools, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.