Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I stop Eclipse from refreshing some dir?

Every time I start Eclipse it tries to refresh an entire project, which translates to more than 10 minutes of wait time, not to mention the ridiculous amount of memory it would consume.

I know there's a global setting to turn off automatic refreshing (General -> Workspace -> Refresh automatically). Is there a way to turn that off on individual directories? The rationale is that some directories are seldom changed in some of my projects.

like image 230
Fortepianissimo Avatar asked Jun 14 '09 19:06

Fortepianissimo


People also ask

How to stop refreshing server adapter list in Eclipse?

If you click on details on the refresh (waiting) dialog you'll see the steps it takes. My bet is that it's stuck on some server related refresh, you can skip that step by clicking the big red stop button. That should solve it.

Where is the refresh button in eclipse?

When a new file is created in Eclipse you might need to refresh the Eclipse project to see the new file. This refresh process can take place automatically. To set auto-refresh, go to window → preferences → general → workspace and check the "Refresh using native hooks or polling" check-box.


2 Answers

According to this thread, no:

  • no settings per projects (for disabling auto-refresh)
  • no settings per directory within one project.

For more recent versions of Eclipse, as detailed in Eclipse help page, you can use Resource filters (also initially mentioned below by pcoucke)

Resource filters can be created, edited and removed in the File > Properties > Resource > Resources Filters property page for a project or folder resource.

Resource filters only apply to files and/or folders that are implicitly included in the workspace by the refresh operation
An "Exclude" resource filter prevent all files and/or folders that match the filter condition to be included in the workspace during the refresh operation.

I mentioned an example in "How to have .git folders ignored by Eclipse projects"

resource filter

like image 146
VonC Avatar answered Oct 02 '22 13:10

VonC


For individual directories you can do it by adding Resource filters.

  1. Right-click a project folder in Project Explorer tree and go to "Properties".
  2. Resource -> Resource Filters.
  3. Add as much exclusion filters for files/folders as you like.

See this answer: https://stackoverflow.com/a/6321688/1194584

like image 37
Pieter Coucke Avatar answered Oct 02 '22 14:10

Pieter Coucke