[ECLIPSE][IDE] How to set project name dynamically [message #1807966] |
Thu, 13 June 2019 08:16  |
Eclipse User |
|
|
|
The eclipse project file (.project) currently defines the project name statically in the name xml tag(<projectDescription><name>xxxx</name></projectDescription>), but we need to adjust it dynamically based on the current branch name because we have several branches checked out at the same time. At the moment we change the project name manually in the file based on the folder name of the branch, but we want to automate that somehow. Is there any way to do that?
|
|
|
|
|
|
|
|
|
Re: [ECLIPSE][IDE] How to set project name dynamically [message #1808667 is a reply to message #1808663] |
Fri, 28 June 2019 08:26   |
Eclipse User |
|
|
|
Yes, of course its impossible with Git because Git has only one working tree. But what you're trying to do can't be such a common practice or the Eclipse SVN support would have tried harder to provide such a thing. And as I said, I think the problem will be bigger than you realize once you start going down this path. Yes you would need to implement a plugin, you would need to install that plugin, and you would need to try to integrate that with the SVN checkout processes. And it's kind of a chicken and egg problem. You can't create the IProject and then rename it because creating it will always fail if the name conflicts, so you have to intercept early in the process, likely somewhere deep down in the SVN support where there are likely no APIs for doing such a things. In any case, the project description has to be modified before the IProject for that description is created, and that doesn't sound like something you can all handle on startup but rather something you need to handle each time SVN checks out a project. And even if you get that all working, then the question that will arise is how do you manage the dependencies between projects (so that you can manage the classpath, for example). Or are these not Java projects nor even projects with project references to other projects? What kind of projects are they?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.30592 seconds