-
Notifications
You must be signed in to change notification settings - Fork 128
Add support for creating workspace private project descriptions #1787
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
base: master
Are you sure you want to change the base?
Conversation
200ca6a
to
7b2449a
Compare
I now added some more checks and it is now possible to create a private project and restart eclipse without a problem, the |
Test Results 428 files - 762 428 suites - 762 17m 41s ⏱️ - 39m 23s For more details on these failures and errors, see this check. Results for commit 345db75. ± Comparison against base commit a791b17. This pull request removes 2957 tests.
♻️ This comment has been updated with latest results. |
5df01d9
to
50bfd88
Compare
Currently importing a project into eclipse requires the creation of a physical file name .project in the root of the project. this has several drawbacks for tools that automatically discover projects and import them for the user as it creates new files and possibly dirty their working tree. Other tools use a single folder for this purpose or don't require any permanent files in the working-tree itself. Even Eclipse has already such concept that is used when a project is located outside the workspace. This now adds a new feature called "workspace private project" that only holds the basic information in the location file in the workspace directory, any additional information might be needed to restore by a tool that uses workspace private projects.
50bfd88
to
345db75
Compare
Thank you for looking at this interesting topic. It looks like as per javadoc in IProjectDescription, project.getFile(IProjectDescription.DESCRIPTION_FILE) is always expected to return such a file; that's one reason in JDT-LS hacks we've seen hacks about overriding the filesystem, and that later we changed (did we? but at least I remember I made it possible in Platorm) to be able to use a linked resource for .project. I think we should aim to get the very minimal new API one can think of. Basically in this proposal, I'm not convinced that |
The flags are actually only flags passed to the creation of the On the other hand the data in Also as you mentioned, there might be code that wants to access the That's the reason why I made this fact "public" and it was quite less changes than initially thought. This also includes to store basically the data currently in the .project file in the workspace area and allows recovery of deleted project files completely, currently Eclipse just creates an almost empty one.
I'm not completely sure about the intend here, this looks rather complicated and cumbersome to use as it requires knowledge of internal implementation details compared to a well defined getter. Another approach would be to make the actual project file "virtual" and e.g. store it in the metadata area next to the |
Most users really won't need to make the difference about whether the file is project-local or workspace-local once the project is created. So the flag would be usually useless. |
If you look at |
Indeed, but what I mean here is that how the project description is stored is not really a property of the project description. IMO, this property shouldn't be part of the description, creating a new |
Currently importing a project into eclipse requires the creation of a physical file name .project in the root of the project. this has several drawbacks for tools that automatically discover projects and import them for the user as it creates new files and possibly dirty their working tree. Other tools use a single folder for this purpose or don't require any permanent files in the working-tree itself. Even Eclipse has already such concept that is used when a project is located outside the workspace.
This now adds a new feature called "workspace private project" that only holds the basic information in the location file in the workspace directory, any additional information might be needed to restore by a tool that uses workspace private projects.
This is currently a draft what already works is that if one creates such a project is is open and can be used in eclipse, but there are some places that want to create / read the
.project
file (e.g. shutdown / restart).