Closed Bug 501456 Opened 15 years ago Closed 13 years ago

quick open overwrites files in different projects with same name on open

Categories

(Skywriter Graveyard :: Search, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: pederbl, Unassigned)

Details

(Whiteboard: quickopen)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/530.5 (KHTML, like Gecko) Chrome/2.0.172.33 Safari/530.5
Build Identifier: tip

<some details>

Reproducible: Always

Steps to Reproduce:
1. create project1. write "string1" in new.txt file and save.
2. create project2. write "string2" in new.txt file and save.
3. exec command "project project1"
4. quick open new.txt. the project1 new.txt file now has the contents: "string2"
I looked at this and found out, that you can't open the same file (same filename), that is within another project. Fixed this here:

  http://bitbucket.org/j4c/bespin/changeset/ddbe4142cba6/

To the basic problem: the issue is based within the project command. This changes the current project within bespin, but it doesn't change the content of the current opened file! So, what happens is this:

- Open file project2, new.txt
- Change the project to project1
=> the textfile is still the one of >>>project2<<<, new.txt
- when you quick open new.txt, this saves the current displayed file (which is the one of project2/new.txt) but with the current project parameter, which is project1! => overrides the textfile within project1.

To solve this we could:
1) remove the project command
2) open a newfile, after the project command was executed and save the current file to the old project
3) have a variable "project", that only belongs to the commandline. So you could change the project, but you don't change the "files" within the bespin UI.

3) could confuse many people. 1) is just a solution to fix it, but it doesn't solve the main problem. Also when creating a new project, the edtiSession.project variable is set to this new project. 2) seems good to me. 

The next question is: when we change the project, a file has to show up. Which file should we use? Load always new.txt and create this one, if it doesn't already exists?

Julian
Solution 2 wouldn't enable future support for having multiple files open at the same time in different projects, right?

Why would number three confuse people. Its not more confusing than the cd command. The current project could appear in front of the prompt in the command line. This solution would also enable future support for having multiple command lines open at the same time with different projects active in each one. This would be very nice for me.
I thought about it and yes, number three feels good to me now too :)

To make the people not confuse, we should display the current project within the commandline. Then the people shouldn't be confused and we are well done.

The idea of multiple command lines is a nice one!
Confirming, as per Julian.
Status: UNCONFIRMED → NEW
Component: General → Search
Ever confirmed: true
OS: Windows XP → All
QA Contact: general → search
Hardware: x86 → All
Whiteboard: quickopen
Version: unspecified → Trunk
Priority: -- → P2
ACETRANSITION

The Skywriter project has merged with Ajax.org's Ace project (the full server part of which is their Cloud9 IDE project). Background on the change is here:

http://mozillalabs.com/skywriter/2011/01/18/mozilla-skywriter-has-been-merged-into-ace/

The bugs in the Skywriter product are not necessarily relevant for Ace and quite a bit of code has changed. For that reason, I'm closing all of these bugs. Problems that you have with Ace should be filed in the Ace issue tracker at GitHub:

https://github.com/ajaxorg/ace/issues
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.