Can't add directories to workspace project
-
When I try to add a directories as a workspace to a project, it doesn’t WORK. I can add files to a workspace, but I can never add a directory to a workspace. It doesn’t even give me the option to do so.
There’s an “Add Folder” option that does NOTHING but ADDS AN EMPTY FOLDER, which is USELESS!!! There’s also options to add files, which isn’t what I’m TRYING TO DO.
I even made a workspace with temporary files, then I saved the workspace project as a file, then I edited the workspace file to replace the file paths inside it with directory paths, and then I reloaded the workspace in Notepad++, but the directories show up as ERRORS, and searching for text in the workspace that I KNOW is in files within the directories I put in the workspace doesn’t show ANYTHING.
How do I . ADD DIRECTORIES TO A WORKSPACE PROJECT?
-
I understand that you are upset, but unforuntately, as a fellow user of Notepad++, all I can tell you is that you are trying to do something without first understanding how the Workspace/Project feature works, and what you appear to be trying to do is not possible in the Workspace/Project feature, hence your confusion and frustration.
As the user manual explains, in the project panel, a “folder” is just a container inside your project, and does not 1:1 correspond to a specific “directory” on your file storage. Specifically, if you want to have a folder under your project, and have it access all the files currently in a specific directory on your computer, you need to Add folder, which adds an empty folder; to populate that folder, you can then right click on that folder, and Add files from directory…, which will add all the files currently in the chosen computer directory into your project’s folder (and if you don’t want all the files, but just a subset, you could use Add files… – the command you already mentioned – instead). But without adding files using one of the two commands, there will be no files in your project. This is the way the Workspace/Project feature of Notepad++ was designed.
Please note that I’m careful to say “currently in a specific directory”: the Workspace/Project feature does not automatically update one of its projects or folders to include new files that have been added to any computer directory, nor to remove files from the projects or folders that have been removed from your computer’s directory. It’s a static list that you can add to or remove from manually.
The “Workspace/Project” feature of Notepad++ is intended as a way for you to manually group disparate files, not necessarily from one computer directory, into a logical/virtual group, which you can save the list of files, and load it again later. No “project” or “folder” within this feature is synced to any specific location or directory hierarchy on your computer. (it’s somewhat the same concept as a project in Visual Studio, where you have to manually add or remove files from the project, even if the directory containing those files has been updated to include more or fewer files; in VS, you can also create a “folder” in your project, where you can put files from throughout your sourcecode tree, regardless of what directory they were part of originally; so in a way, other than the compiling features that VS provides, it’s very much like the project inside a VS solution.)
If you want a similar panel in Notepad++, but one that automatically tracks one or more computer directories (in a hierarchical manner), rather than manually putting together a static list of files for your project, I recommend “Folder As Workspace” (“FaW”), in which you can add one or more computer directories for the FaW panel to track. This feature doesn’t allow you to arbitrarily organize the files like you can in a project panel, but it does automatically track one or more directories in your panel.
Unfortunately, your description of your search implies that you are using the “Find in Project” feature, which is something that doesn’t have an exact duplicate for the FaW feature. The Find in Files search tab comes close, because it can search any single directory (or recursive directory, depending on your options), but it will not be able to automatically pick the top level directory from FaW (though you can easily get Find in Files to start searching in the directory where the active file is, and can quickly modify that start-in-directory to go up a directory or two)
But, unfortunately for you, it doesn’t look like either FaW or Workspace/Project features will do everything that you want it to; so you’ll have to pick which subset of features are most important to you (if syncing to the actual computer filesystem is most important, pick FaW; if being able to Find In Project is most important and the one-directory or one-recursive-directory available through Find In Files isn’t sufficient for you, you might need to live with the limitations of Workspace/Project, instead of using FaW)
No, I don’t know why the developer implemented those two Panels separately, rather than just allowing the Project feature to either set a Folder to always “track” a directory or to be a “manual” folder instead; he has resisted all requests to combine the best of both features into a single unified user experience, unfortunately. Which means that neither FaW nor Workspace/Project will have all the features that many users want from the same feature in Notepad++, annoying users who want all the features from both Panels in one place. Sorry.