Inside a gradle root project you have got at least
I preferred the temporary project approach but I didn't like the manual work to create links etc... So what about having this been done automatically?
This is exact what the so called "Virtual root project" does: By clicking a button inside the EGradle toolbar you are able to (re-)create a "Virtual root project" of your current set gradle root project. The virtual root project will contain all folders and files of gradle root project folder being not already imported as an eclipse project into current workspace.
Inside a simple build file we apply the gradle eclipse plugin to all sub projects:
The both projects were already imported into eclipse workspace:
After clicking the red marked toolbar button the virtual root project shows up. It contains NOT the both already imported projects but only the missing stuff:
If you delete e.g. "testproject1" (without content delete!) and press the toolbar button again, the "testproject1" sub folder will be shown again inside the virtual root project.
When you add a new file or folder to the base folder of the virtual root project - as shown in next image - the folder/file will NOT be created to the virtual project but inside the original gradle root project folder (this ensures you do not accidently add/commit something from virtual root project)
The virtual root project contains only a link to origin file/folder. Inside the linked folders new created files/folders will be simply created in link target and shown as normal files.e
EGradle is aware of your delete attempt and will support you to delete the file in real root folder too. A dialog ask you about the deletion:
button and the file is deleted
A simple click to the button does recreate it again from
scratch. At doing this current already opened/imported gradle projects
are recognized again.
The button is only enabled when the current gradle root project is a multi project.
(If there occurs an errror on virtual root project creation - e.g. "cannot create link to ..." please simply press the button again. The problem is well known but currently not fixed)
|If your team provider does not automatically connect the project to your SCM you have to connect it again.
Simply exclude folder ".egradle" from your source versioning
On virtual root project you got popup actions. Contains same as on toolbar and some additionals.
Note: .gitignore is not visible at all in virtual root project