-
Notifications
You must be signed in to change notification settings - Fork 2
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
opening wrong project #2
Comments
"The next time I try to open project A" I am not entirely sure where my package specifically other then atom.project.setPaths which I would assume would be the cleanest way to make the tree-view display the right project. I am unsure how I should go about clearing that state without saving previous state which I am not doing currently. It's all of 20 lines of code right now in 0.1.2 It calls the gitDirectory function that recursively checks up the directory tree for the presence of a .git folder, if found it returns the project directory. Once the git project directory of the current file is found, it compares that to atom.project.getPaths to determine if it needs to switch projects and reveal the current tab in tree-view. The active tabs and atom.project keep the state, I don't save any state inside my package. If you are using another project switching package, it may be the case that all it's doing is calling atom.project.setPaths to switch to project A without opening a tab, and then somehow re-activating a tab in project B immediately after which causes a .git path search and mis-match with atom.project.getPaths which then results in switching back to Project B. I am not entirely sure how to fix this.. perhaps listening for atom.project.setPaths, determining it's from another package, saving that state, then on next tab activation ignore it and clear that state in order to attempt to guess at the intent of the setPaths? |
I usually open a project with I have some ideas on this. I suspect Atom's state-saving is interfering. When I get a chance I'll look at your code and see if I can help. Did you try to repeat the problem? |
I could not reproduce most of this issue. I may have found a similar issue in base atom editor:
I don't know if this is related, but that would be a bug in Atom editor itself, I can only work with the even worse when I open the developer console and |
Can you file an issue at atom/atom with what you said here? Or do you want On Fri, Jan 30, 2015 at 12:54 PM, CoffeeScript notifications@github.com
|
Could you file the issue? I just tried to reproduce it again and it seems to be be opening the proper project folder for me now after right-clicking on a folder and choosing if you can get the bug to manifest more consistently, you should file the bug report, |
I was just looking at Project::setPaths and the paths seem to be So I fear that using setPaths for something not matching the directory that If I have time I'll chase down this serialization thing some more. If it On Fri, Jan 30, 2015 at 1:09 PM, CoffeeScript notifications@github.com
|
Yep, I was a little surprised that atom editor didn't have multiple projects support, or "favorites" support. I looked at the source code for several project switching packages, most used |
I am going to close this as the discussion should be moved to atom/atom#5533 |
When I am in project A and I select a tab that switches the tree to project B and then close the window things are left in a bad state. The next time I try to open project A I get project B instead. This even happens when there are no tabs open while closing.
There is a similar problem even without closing the window. When I'm viewing a tab in project B and all tabs are closed, the project is left at B and I can't open any of my project A files.
At the moment I'm kind of screwed. I can't get project A to open. I guess I'll have to manually open a file in A to get the tree switched.
IMHO, everything should be cleared to project A when the last tab is closed or if the window is closed.
Actually this package should save no state at all. I cant see any reason. If you have a reason maybe you should add a setting to stop saving state.
The text was updated successfully, but these errors were encountered: