randy3k / ProjectManager

Project Manager for Sublime Text
MIT License
328 stars 26 forks source link

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

Open zymr-keshav opened 6 years ago

zymr-keshav commented 6 years ago

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

Environment

ProjectManager:

    version: 0.7.2
    installed via Package Control: True

Sublime Text:

    channel: stable
    version: 3126
    platform: mac
    architecture: x64
randy3k commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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
randy3k commented 6 years ago

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

zymr-keshav commented 6 years ago

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 commented 6 years ago

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

zymr-keshav commented 6 years ago

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