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

Project Panel > Reload Workspace not working #11551

Open
pryrt opened this issue Apr 18, 2022 · 0 comments
Open

Project Panel > Reload Workspace not working #11551

pryrt opened this issue Apr 18, 2022 · 0 comments

Comments

@pryrt
Copy link
Contributor

pryrt commented Apr 18, 2022

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

  1. Open the project panel and load a workspace (ex: PeterWorkspace.xml)
  2. 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
  3. 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 
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

1 participant