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
When importing the settings, all document groups are transferred correctly, but the documents themselves are not. I have been registering the problem since version 17.
How to reproduce
No response
Did this work correctly in an earlier version?
Apache NetBeans 17
Operating System
linux
JDK
openjdk version "11.0.20.1" 2023-08-24 OpenJDK Runtime Environment (build 11.0.20.1+1-post-Ubuntu-0ubuntu122.04) OpenJDK 64-Bit Server VM (build 11.0.20.1+1-post-Ubuntu-0ubuntu122.04, mixed mode, sharing)
@mbien it's under the Window menu. Although I'm unclear exactly the issue? That the group names themselves are migrated, but that the documents they refer to are not?
you know... this looks quite useful! One thing is missing: if switching to the group "none" would automatically stash the last group into "stashed group", so that you can switch back when you are done.
Looks related to something @lkishalmi brought up a while back on importing window configuration. There's a DocumentGroups folder in <userdir>/config that contains the group configuration and window modes, which are copied across, but window settings files (hence document references) that are not. I'm not sure if it's a good idea to bring those across as is though?
EDIT: I also deleted the DocumentGroups folder and restarted NB19, and the group names still showed up, so it might be somewhere else they're stored that is being imported.
I came to this thread from a collateral effect. After upgrading from v20 to v21 I had my settings imported when opening for the first time, but the editor tabs I have open in v20 were not open in v21 (editor was plain empty).
I tried creating a "Document group" in v20, and the group is available in v21, but the editor opens empty again and if I open the Document group nothing happens.
I see that "Document group" functionality is worth evaluating for the day to day, but for now I just wanted to move from v20 to v21 and keeping in v21 the same editor tabs I had (and still have) in v20
Any other idea for starting v21 with the same open files as I have in v20?
@jroman opened files are currently not imported since those are part of regular UI persistence which has no compatibility promises between versions.
You can try to replace the config manually:
it would be in [netbeans_user_config]/[version]/config/Windows2Local/*
this usually works but there are no guarantees.
I tried to look into this a few times already but always got distracted by code cleanups (#7155) since the part of the codebase is ancient and had several other issues with higher priority (e.g #6094, #6559), but we are going to get to this one day - I would like to see this too.
ran a few experiments:
letting NB auto import config/Windows2Local/.* (or a subset of it) would break things since NB would try to deserialize UI components before the right clusters are active, this will open the tabs but the state is inconsistent (it will also throw exceptions).
what seems to work a bit better is:
let NB import the settings and close NB again
copy Windows2Local
start NB a second time
since this makes sure that the right clusters are active before the deserialization begins.
@mbien it might be better to look at storing as a set of URI instead, similar to parts of the project group support. Possibly even hide the document groups from the UI and just support project grouping?
@neilcsmith-net I believe this wouldn't work properly, since it wouldn't be able to create the project group/doc group -> files associations. If would open the files but if you switch pg or dg it wouldn't do anything.
I just noticed while testing that ant projects seem to store a file list per project group directly in the project folder in nbproject/private/private.xml
its interesting to me that different project types have different ways how to handle this.
Activity
mbien commentedon Nov 4, 2023
I am not quite sure what you mean by "document groups"
neilcsmith-net commentedon Nov 4, 2023
@mbien it's under the Window menu. Although I'm unclear exactly the issue? That the group names themselves are migrated, but that the documents they refer to are not?
mbien commentedon Nov 4, 2023
@neilcsmith-net wow, didn't even know that this existed
neilcsmith-net commentedon Nov 4, 2023
OK, just set up some groups in NB19, then imported settings into NB20-rc3. Group names are there, but they have no documents included.
I've never used it to be honest, unlike project groups which kind of fulfil that requirement for me.
mbien commentedon Nov 4, 2023
you know... this looks quite useful! One thing is missing: if switching to the group "none" would automatically stash the last group into "stashed group", so that you can switch back when you are done.
neilcsmith-net commentedon Nov 4, 2023
Looks related to something @lkishalmi brought up a while back on importing window configuration. There's a
DocumentGroupsfolder in<userdir>/configthat contains the group configuration and window modes, which are copied across, but window settings files (hence document references) that are not. I'm not sure if it's a good idea to bring those across as is though?EDIT: I also deleted the
DocumentGroupsfolder and restarted NB19, and the group names still showed up, so it might be somewhere else they're stored that is being imported.[-]Document Groups[/-][+]Document Groups don't import correctly[/+]jroman commentedon Apr 16, 2024
Any hope for advance in this bug?
I came to this thread from a collateral effect. After upgrading from v20 to v21 I had my settings imported when opening for the first time, but the editor tabs I have open in v20 were not open in v21 (editor was plain empty).
I tried creating a "Document group" in v20, and the group is available in v21, but the editor opens empty again and if I open the Document group nothing happens.
I see that "Document group" functionality is worth evaluating for the day to day, but for now I just wanted to move from v20 to v21 and keeping in v21 the same editor tabs I had (and still have) in v20
Any other idea for starting v21 with the same open files as I have in v20?
Thanks in advance.
mbien commentedon Apr 16, 2024
@jroman opened files are currently not imported since those are part of regular UI persistence which has no compatibility promises between versions.
You can try to replace the config manually:
it would be in
[netbeans_user_config]/[version]/config/Windows2Local/*this usually works but there are no guarantees.
I tried to look into this a few times already but always got distracted by code cleanups (#7155) since the part of the codebase is ancient and had several other issues with higher priority (e.g #6094, #6559), but we are going to get to this one day - I would like to see this too.
mbien commentedon Apr 17, 2024
ran a few experiments:
letting NB auto import
config/Windows2Local/.*(or a subset of it) would break things since NB would try to deserialize UI components before the right clusters are active, this will open the tabs but the state is inconsistent (it will also throw exceptions).what seems to work a bit better is:
Windows2Localsince this makes sure that the right clusters are active before the deserialization begins.
jroman commentedon Apr 17, 2024
Thanks for your reply!
That worked for me. I hope there is no incompatibility with the config files...
neilcsmith-net commentedon Apr 17, 2024
@mbien it might be better to look at storing as a set of URI instead, similar to parts of the project group support. Possibly even hide the document groups from the UI and just support project grouping?
mbien commentedon Apr 17, 2024
@neilcsmith-net I believe this wouldn't work properly, since it wouldn't be able to create the project group/doc group -> files associations. If would open the files but if you switch pg or dg it wouldn't do anything.
mbien commentedon Jun 1, 2024
I just noticed while testing that ant projects seem to store a file list per project group directly in the project folder in
nbproject/private/private.xmlits interesting to me that different project types have different ways how to handle this.