Skip to content

Conversation

mbien
Copy link
Member

@mbien mbien commented Sep 8, 2025

  • projects dir is now registered as favorite (after user home)
  • fixed bug: when a custom project dir location is specified by setting netbeans.projects.dir, the dir is now automatically created, instead of falling back to the default dir, which gave the impression that the property isn't working
image

 - projects dir is now registered as favorite
 - fixed bug: when a custom project dir location is specified by
   setting  'netbeans.projects.dir', the dir is now automatically
   created, instead of falling back to the default dir, which
   gave the impression that the property isn't working
@mbien mbien added this to the NB28 milestone Sep 8, 2025
@mbien mbien added Editor UI User Interface ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) labels Sep 8, 2025
</folder>

<folder name="Favorites">
<file name="NetBeansProjects.shadow">
Copy link
Member Author

@mbien mbien Sep 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: i couldn't figure out how to put the display name of "NetBeansProjects" into the bundle. It did change the name within the layer tree, but didn't change within the Favorites tab. I believe "Home" is also not localized unless I overlooked something.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lines -

changed to

String name = super.getDisplayName();

should do this. Pros and cons, although matching the value of

would be desirable for platform apps.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we would have to check if renaming nodes still works, because favorites renames the virtual top level nodes instead of the files. Not sure what will happen when it uses the display name.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, worth making sure. As it changes the name of the shadow (symlink) then hopefully. Forgot to check when playing with this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked and it would rename the virtual file without the display name.

the current Home node registration is:

<folder name="Favorites">
<attr name="SystemFileSystem.localizingBundle" stringvalue="org.netbeans.modules.favorites.Bundle"/>
<file name="Home.shadow">
<attr name="originalFile" methodvalue="org.netbeans.modules.favorites.FavoritesNode.getHome"/>
<attr name="originalFileSystem" stringvalue="org.netbeans.modules.masterfs.MasterFileSystem"/>
<attr name="position" intvalue="100"/>
</file>
</folder>

renaming Home using NB 27 works, but if we would render the display name (e.g HOME42), it would no longer make the update visible and it will keep showing HOME42.

Changing the impl might be a bit too risky for the scope of this PR - who knows what relied on this. I suppose platform applications could remove the item via their layer somehow?

@neilcsmith-net
Copy link
Member

neilcsmith-net commented Sep 11, 2025

I think this is a good change, and probably OK, as long as it's configurable for platform applications.

Mixed feelings about whether Favorites nodes needs to support localization / branding first.

And a somewhat tangential question - should we show Favorites rather than Services in the default window setup?

@mbien
Copy link
Member Author

mbien commented Sep 11, 2025

And a somewhat tangential question - should we show Favorites rather than Services in the default window setup?

Yep, as mentioned somewhere else I think we should open it by default in the same tab group as Projects/Files/Favorites. But its probably something to discuss first on the dev list first?

Might be even good to open Favorites with the first file if we can figure out how to do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) Editor UI User Interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants