You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Open the project panel and load a workspace (ex: PeterWorkspace.xml)
While Notepad++ is still open, edit the PeterWorkspace.xml in notepad.exe or other external editor, adding a file or section, or deleting a file or section, and saving
Project Panel > Workspace > Reload Workspace
Expected Behavior
I would think that the Project Panel would update, and list the new files or sections, or remove the old files or sections, that are no longer in the XML file.
Actual Behavior
The Project Panel view did not change at all.
Additional Debugging
But if I leave the Project Panel open, exit Notepad++ and re-run Notepad++, it correctly sees the updated XML. So it seems like the Workspace > Reload Workspace is not actually doing anything.
Alternately, if I edit the PeterWorkspace.xml in notepad.exe, then do Project Panel > Workspace > Reload Workspace to "close" the workspace, then Project Panel > Workspace > Open Workspace and pick the same file, it does see the updated version.
Those two experiments show the file was really edited and saved, and that it's just Reload Workspace that does not behave as advertised.
Additionally, if I edit the PeterWorkspace.xml in notepad.exe, then Reload Workspace to no visible effect, then hit Save Workspace, Notepad++ overwites the changes that were made in notepad.exe and instead writes what is currently visible in Notepad++. That sequence shows that Reload Workspace didn't even change the underlying memory/data structure inside Notepad++, because it's saving what Notepad++ had originally loaded, rather than what it should have in its memory from the Reload Workspace.
Debug Information
Tried in v8.3.3 and v7.9.2, both with the same problem. So then I did a bigger jump, and found that v7.8.0 worked (I could edit the XML in notepad.exe, then reload workspace, and the Project Panel updated to show the new list of files in that workspace); I then jumped forward to v7.8.9, which still worked. But stepping to v7.9.0, it stopped working. So it was probably something that got changed with #8719 or #8471 that caused the Reload Workspace feature to stop working.
Debug info for the versions of v8.3.3, v7.8.9, and v7.9 that I used are shown below
Doesn't Work:
Notepad++ v8.3.3 (64-bit)
Build time : Mar 13 2022 - 17:20:02
Path : C:\usr\local\apps\npp\npp.8.3.3.portable.x64\notepad++.exe
Command Line :
Admin mode : OFF
Local Conf mode : ON
Cloud Config : OFF
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 2009
OS Build : 19042.1586
Current ANSI codepage : 1252
Plugins : mimeTools.dll NppConverter.dll NppExport.dll
Works Right:
Notepad++ v7.8.9 (64-bit)
Build time : Jul 15 2020 - 20:31:49
Path : C:\usr\local\apps\npp\npp.7.8.9.bin.x64\notepad++.exe
Admin mode : OFF
Local Conf mode : ON
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 2009
OS Build : 19042.1586
Current ANSI codepage : 1252
Plugins : mimeTools.dll NppConverter.dll NppExport.dll
Doesn't Work
Notepad++ v7.9 (64-bit)
Build time : Sep 22 2020 - 03:19:04
Path : C:\usr\local\apps\npp\npp.7.9.portable.x64\notepad++.exe
Admin mode : OFF
Local Conf mode : ON
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 2009
OS Build : 19042.1586
Current ANSI codepage : 1252
Plugins : mimeTools.dll NppConverter.dll NppExport.dll
The text was updated successfully, but these errors were encountered:
Description of the Issue
Project Panel > Workspace > Reload Workspace does not seem to reload the workspace XML.
This was brought to light as a tangential discovery in Community Forum discussion https://community.notepad-plus-plus.org/topic/22863/project-panel-api-how-to-reload-workspace-programmatically
Steps to Reproduce the Issue
PeterWorkspace.xml
)PeterWorkspace.xml
in notepad.exe or other external editor, adding a file or section, or deleting a file or section, and savingExpected Behavior
I would think that the Project Panel would update, and list the new files or sections, or remove the old files or sections, that are no longer in the XML file.
Actual Behavior
The Project Panel view did not change at all.
Additional Debugging
But if I leave the Project Panel open, exit Notepad++ and re-run Notepad++, it correctly sees the updated XML. So it seems like the Workspace > Reload Workspace is not actually doing anything.
Alternately, if I edit the
PeterWorkspace.xml
in notepad.exe, then do Project Panel > Workspace > Reload Workspace to "close" the workspace, then Project Panel > Workspace > Open Workspace and pick the same file, it does see the updated version.Those two experiments show the file was really edited and saved, and that it's just Reload Workspace that does not behave as advertised.
Additionally, if I edit the
PeterWorkspace.xml
in notepad.exe, then Reload Workspace to no visible effect, then hit Save Workspace, Notepad++ overwites the changes that were made in notepad.exe and instead writes what is currently visible in Notepad++. That sequence shows that Reload Workspace didn't even change the underlying memory/data structure inside Notepad++, because it's saving what Notepad++ had originally loaded, rather than what it should have in its memory from the Reload Workspace.Debug Information
Tried in v8.3.3 and v7.9.2, both with the same problem. So then I did a bigger jump, and found that v7.8.0 worked (I could edit the XML in notepad.exe, then reload workspace, and the Project Panel updated to show the new list of files in that workspace); I then jumped forward to v7.8.9, which still worked. But stepping to v7.9.0, it stopped working. So it was probably something that got changed with #8719 or #8471 that caused the Reload Workspace feature to stop working.
Debug info for the versions of v8.3.3, v7.8.9, and v7.9 that I used are shown below
Doesn't Work:
Works Right:
Doesn't Work
The text was updated successfully, but these errors were encountered: