Bug 210562 - Can not open two projects named the same in different directories
Summary: Can not open two projects named the same in different directories
Status: CONFIRMED
Alias: None
Product: kdevplatform
Classification: Developer tools
Component: project (other bugs)
Version First Reported In: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-14 16:42 UTC by jmachowinski
Modified: 2021-03-22 08:16 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jmachowinski 2009-10-14 16:42:48 UTC
Version:            (using KDE 4.3.2)
OS:                Linux
Installed from:    Ubuntu Packages

If there are two CMake projects foo
in a/foo
and b/foo
you can open only one at a time.

The problem occures with KDevelop 4.0 Beta 5 under Ubuntu
and with a two weak old svn build under gentoo.
Comment 1 Andreas Pakulat 2009-10-14 19:49:47 UTC
Does it work if you edit the foo.kdev4 file and adjust the name of the project to be different? If not, what exactly is the error? Or does opening the second project just not do anything at all?
Comment 2 jmachowinski 2009-10-14 20:26:03 UTC
The error is : 
Project could not be opened: file:///.../hbridge.kdev4

If I rename the project inside the .kdev4 file it works fine.
Comment 3 Milian Wolff 2009-10-14 21:39:26 UTC
the real bug is imo that the project open dialog does not warn you about the fact that theres already a project with that name. with name being the entry in the .kdev4 file.

imo it's a no-go to have two projects opened with the same name. items in quickopen would get undescernible.

we'd have to force a new name at several places:

1) when the project is created and the list of open (and preferrably also recently opened) projects contains that name
2) when the user tries to open a project with another project already open that has that name. this is also required, since when the first project is created, closed and after some time the second is created, it#s not guaranteed to find the first one during create-time.
Comment 4 Andreas Pakulat 2009-10-14 23:33:17 UTC
(In reply to comment #3)
> the real bug is imo that the project open dialog does not warn you about the
> fact that theres already a project with that name. with name being the entry in
> the .kdev4 file.
> 
> imo it's a no-go to have two projects opened with the same name. items in
> quickopen would get undescernible.

I completely disagree. The project name is just that, a (user specified) name for the project. We do need a GUI for changing that name though to make people aware they can change it.

One of my most-hated mis-features in Eclipse is that I can't open 2 projects with the same name from two different places. (In fact this causes a major headache for the eclipse-based stuff I work on).

> we'd have to force a new name at several places:

No need to force a new name, just keep the one we have. We can always add a (2) to the item's text if we want to of course. But that shouldn't be part of the name.
Comment 5 Andreas Pakulat 2009-11-17 00:10:29 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > the real bug is imo that the project open dialog does not warn you about the
> > fact that theres already a project with that name. with name being the entry in
> > the .kdev4 file.
> > 
> > imo it's a no-go to have two projects opened with the same name. items in
> > quickopen would get undescernible.
> 
> I completely disagree. The project name is just that, a (user specified) name
> for the project. We do need a GUI for changing that name though to make people
> aware they can change it.

Actually, we already have plugins and code relying on project names being unique. So 2 projects with the same name won't happen, but the dialog is still needed.
Comment 6 Olivier.jg 2009-11-17 03:50:29 UTC
That may tie this in with this bug: https://bugs.kde.org/show_bug.cgi?id=207679

That's a fairly simple bug in which it tries to find the parent folder, but the parent folder is null because you're renaming the project directory.

The question is what to do when someone tries to rename the project directory.
If it should rename the project along with the directory (the two concepts seem fairly indistinguishable as it is), then the fix is to make it do so and thus resolve this.
If the project name and directory are permitted to be different... then things may get confusing.
Or perhaps you shouldn't be allowed to rename the project folder from the context menu, and instead the context menu has an entry for "Rename Project" on the project folder, which opens a dialog and in the process fixes that other bug.
Comment 7 Olivier.jg 2010-09-17 00:55:59 UTC
So, long story short, unique project names are necessary.
The warning dialog does mention that the reason it cannot be opened is because there's another one with the same name opened already.
Comment 8 jmachowinski 2010-09-17 10:14:49 UTC
Just out of curiosity, is there now a dialog that asks you to change the name of the second project you just tried to open ?
I personally hated it to hand edit the .kdev4 files when this happened.
Comment 9 Milian Wolff 2010-09-17 19:21:16 UTC
reopening, I agree that the situation should be improved.
Comment 10 Justin Zobel 2021-03-09 23:42:44 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.
Comment 11 jmachowinski 2021-03-22 08:16:44 UTC
I just checked, version 5.6.1 still has the same problem.