Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 338257

Summary: [wizard] Automatically search for project when "Root directory" loses focus
Product: z_Archived Reporter: Pascal Rapicault <pascal>
Component: m2eAssignee: Milos Kleint <mkleint>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: igor, matthew, mkleint
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Pascal Rapicault CLA 2011-02-25 13:32:55 EST
In the Import Maven project wizard, when I type something in the "root directory" entry, I would like the list of projects to be automatically filed when the entry loses focus. This way I don't have to go and hit the refresh button. This would be consistent with the behaviour of the "import existing project" provided by the platform.
Comment 1 Milos Kleint CLA 2011-02-28 07:52:30 EST
huh. I haven't even noticed before there is a refresh button there. I would say get rid of it entirely, you some eclipse people apparently like their refreshes :)
Comment 2 Matthew Piggott CLA 2011-02-28 11:14:07 EST
One thing I noticed on the weekend, if you select a directory, press Refresh, then go and edit a pom (outside Eclipse) pressing Refresh doesn't show changes to the artifactId
Comment 3 Milos Kleint CLA 2011-02-28 11:17:05 EST
is the refresh intended to refresh repository? I thought it's just for refreshing the list of projects?
Comment 4 Matthew Piggott CLA 2011-02-28 11:27:49 EST
It is for listing the projects, thinking about it more, I may not have changed the pom.xml but the .project file in one of the projects.

Either way, it doesn't appear to be doing a proper Refresh.
Comment 5 Milos Kleint CLA 2011-03-01 03:47:47 EST
http://git.eclipse.org/c/m2e/m2e-core.git/commit/?id=b3f16c75493b16c12ce3378e73442fc93bffae40

I don't think a proper eclipse refresh is necessary here, all the list population code is using java.io.File instances, not eclipse IResources as far as I could tell, so a workspace refresh is not required.
Comment 6 Pascal Rapicault CLA 2011-03-04 11:08:02 EST
verified.
Comment 7 Igor Fedorenko CLA 2011-03-11 12:14:19 EST
This causes problems in some cases. When import a child module of a workspace aggregator project

* right-click on aggregator, import..., existing maven projects...
** expected: list of child modules to import
* press Finish button to import the projects
** expected: wizard disappears and projects get imported
** observed: wizard rescans available projects again

pressing Finish button for the second time works
Comment 8 Igor Fedorenko CLA 2011-03-11 18:33:17 EST
Only rescan projects when root directory changes. 

Also disabled rescan from ModifyListener because at least on linux/gtk this triggered rescan after each one char change to the field.

http://git.eclipse.org/c/m2e/m2e-core.git/commit/?id=29df25bba70d87733df922634005686b7f2c41ae
Comment 9 Denis Roy CLA 2021-04-19 13:26:46 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/