Skip to content
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

Do not read sublime-project file if already saved multiple projects in ST3 #72

Open
zymr-keshav opened this issue Oct 27, 2017 · 10 comments

Comments

@zymr-keshav
Copy link

Unable to find any project when already save the project using sublime-text3 and install Project Manager at later stage

I have saved multiple projects in ST3 and it was working fine but I need to remove unnecessary project so installed Project Manager and restart the ST3 in Mac OS Sierra 10.12.6

...

Any other information you want to share that is relevant to the issue being reported. This might include the lines of code that you have identified as causing the bug, and potential solutions (and your opinions on their merits).

Expected behaviour

when click on import folder, it must automatiaccly collect all *.sublime-project file from given main directory ( which we can set somehow)

suppose I have all my projects under /opt directory and we set from the custom setting of Project Manager

{ import_sublime_project_directory: '/opt' }

and when we click on import *.sublime-project File than it will collect all project and now we can manage ( rename, remove and other operations)

...

Actual behavior

when I am using Project Manager: Add Project or Project Manager: Open Project or any other command, from command palette it always pop up the message

"project list is empty" and do nothing

moreover, it also blocks the default keyboard shortcut (command + control +p) which display the list of all projects

I have also tried import *.sublime-project File option but it pop-ups

"Project file not found"

so edit settings Preferences: Project Manager Settings

{
    "projects_path":["/opt/"],
}

and run import *.sublime-project File

but it gives permission error

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 795, in run_
    return self.run(**args)
  File "project_manager in /Users/keshav.m/Library/Application Support/Sublime Text 3/Installed Packages/ProjectManager.sublime-package", line 512, in run
  File "project_manager in /Users/keshav.m/Library/Application Support/Sublime Text 3/Installed Packages/ProjectManager.sublime-package", line 134, in __init__
  File "project_manager in /Users/keshav.m/Library/Application Support/Sublime Text 3/Installed Packages/ProjectManager.sublime-package", line 198, in get_all_projects_info
  File "project_manager in /Users/keshav.m/Library/Application Support/Sublime Text 3/Installed Packages/ProjectManager.sublime-package", line 147, in load_sublime_project_files
PermissionError: [Errno 13] Permission denied: '/opt/proj-ui/application-manager/build/dependency-cache'

Why this is checking inside the deeper folder
...

So my question is how to add exiting all project in Project Manager so that I can manage.

Steps to reproduce

  • Install Project Manager and Restart the Sublime text 3
    1. open command palette (command + shift + p) and write Project Manager
    2. click on Add Project, Open Project, Edit Project
    3. nothing happens

Environment

ProjectManager:

    version: 0.7.2
    installed via Package Control: True

Sublime Text:

    channel: stable
    version: 3126
    platform: mac
    architecture: x64
@randy3k
Copy link
Owner

randy3k commented Oct 27, 2017

when click on import folder, it must automatiaccly collect all *.sublime-project file from given main directory ( which we can set somehow)

I guess you have misunderstood how Project Manager works. You don't have to import the folder. In fact, there is no option to import a folder.
You really don't want to change the setting projects_path unless you know what you want to achieve.

moreover, it also blocks the default keyboard shortcut (command + control +p) which display the list of all projects

It is expected as Project Manager is a replacement for the built-in manager.

So my question is how to add exiting all project in Project Manager so that I can manage

Try to follow https://github.com/randy3k/ProjectManager#add-existing-projects-to-project-manager

@zymr-keshav
Copy link
Author

zymr-keshav commented Oct 27, 2017

so according to the provided link, I have to move all project's .sublime-project and .sublime-workspace_files into /Package/User/Projects/ folder. Is that so?

suppose I have 3 projects under /opt as below and each project has .sublime-project and .sublime-workspace file
.
├── projA
├── projB
├── projC

so I need to cut all these files and paste under /Packages/User/Projects folder

But this seems not OK. In future, if I disabled or remove this package from ST or copy these project from this system to another system then before doing that I have to move back these files (.sublime-project and .sublime-workspace) to the respective project folder.

Can't I keep this files (.sublime-project and .sublime-workspace) in the respective project folder as well? means not move but copy into /Package/User/Projects/
.
Although I have solved my issue by adding each project's path in Packages/User/project_manager.sublime-settings file using Package Manager Settings

{
    "projects_path":["/opt/projA/", "/opt/projB/", "/opt/projC/"],
}

BUT it always takes significant time to load and display the project window using key board shortcut, not showing as quick as default switch project window does.

@randy3k
Copy link
Owner

randy3k commented Oct 27, 2017

if I have disabled or remove this package from ST or copy these project from one system to other then before that I have to move back these files to respective project folder.

You are right

although I have achieved this by adding each project's path in Package Manager settings but it always takes significant time to load and display the project window, not showing quick as default switch project window.

I suppose you have a lot of others files in the Projects directory. It may take some time as Project Manager has to walk over the directory to search for *.sublime-project files. So it is recommended to use move the projects to /Package/User/Projects/ .

If you really don't want to move the project files. You may want to use the second option to import existing sublime projects.

@zymr-keshav
Copy link
Author

zymr-keshav commented Oct 27, 2017

So to use Project Manager I have to move my all projects completely from current directory /opt/ to /Package/User/Projects.

This seems vague.

again if I use import *.sublime-project File option, it always ends up with pop-ups that "this project is created by Project Manager" even it is already added.

Does Project Manager not check whether the project is already added?

@randy3k
Copy link
Owner

randy3k commented Oct 27, 2017

You cannot import projects which are located in projects_path. Those files are supposed to be managed by Project Manager. My advice for you is to reset projects_path and use the import option again.

@zymr-keshav
Copy link
Author

zymr-keshav commented Oct 27, 2017

not working. reset the projects_path , restart sublime and again open project folder in sublime and click import *.sublime-project File and it say project file not found.
keshav_osx 2017-10-28 at 1 29 02 am

@zymr-keshav zymr-keshav changed the title Do not read if i already have saved multiple projects in ST3 Do not read sublime-project file if already saved multiple projects in ST3 Oct 27, 2017
@randy3k
Copy link
Owner

randy3k commented Oct 27, 2017

Are you sure that you have opened the sublime project file?

@zymr-keshav
Copy link
Author

Yes I have opened the respective .sublime-project file in the first tab of sublime-text and than select import *.sublime-project File but still same pop-up

@randy3k
Copy link
Owner

randy3k commented Oct 28, 2017

I don’t mean opening the file, but to open the project via subl *.sublime-project

@zymr-keshav
Copy link
Author

zymr-keshav commented Oct 30, 2017

yes that is working fine when I execute subl . through the terminal from this directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants